mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add is_admin field to group_membership table
This commit is contained in:
parent
54faa0494b
commit
7f04a381a1
3 changed files with 22 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
|
|
@ -33,4 +34,7 @@ export class GroupMembership {
|
|||
|
||||
@UpdateDateColumn()
|
||||
updatedAt?: Date
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isAdmin!: boolean
|
||||
}
|
||||
|
|
|
|||
9
packages/db/migrations/0101.do.add_is_admin_to_group_membership.sql
Executable file
9
packages/db/migrations/0101.do.add_is_admin_to_group_membership.sql
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
-- Type: DO
|
||||
-- Name: add_is_admin_to_group_membership
|
||||
-- Description: Add is_admin field to group_membership table
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE omnivore.group_membership ADD COLUMN is_admin BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
COMMIT;
|
||||
9
packages/db/migrations/0101.undo.add_is_admin_to_group_membership.sql
Executable file
9
packages/db/migrations/0101.undo.add_is_admin_to_group_membership.sql
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
-- Type: UNDO
|
||||
-- Name: add_is_admin_to_group_membership
|
||||
-- Description: Add is_admin field to group_membership table
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE omnivore.group_membership DROP COLUMN IF EXISTS is_admin;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in a new issue