feat(36-01): add isAdmin column to users table schema and generate migration
- Add isAdmin boolean(is_admin) NOT NULL DEFAULT false to users table - Generate migration 0009_spotty_lord_tyger.sql - NOTE: db:push requires DATABASE_URL with correct credentials to apply
This commit is contained in:
1
drizzle-pg/0009_spotty_lord_tyger.sql
Normal file
1
drizzle-pg/0009_spotty_lord_tyger.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "users" ADD COLUMN "is_admin" boolean DEFAULT false NOT NULL;
|
||||||
1704
drizzle-pg/meta/0009_snapshot.json
Normal file
1704
drizzle-pg/meta/0009_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -64,6 +64,13 @@
|
|||||||
"when": 1776521936465,
|
"when": 1776521936465,
|
||||||
"tag": "0008_productive_tyrannus",
|
"tag": "0008_productive_tyrannus",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 9,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1776624400405,
|
||||||
|
"tag": "0009_spotty_lord_tyger",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,7 @@ export const users = pgTable("users", {
|
|||||||
displayName: text("display_name"),
|
displayName: text("display_name"),
|
||||||
avatarUrl: text("avatar_url"),
|
avatarUrl: text("avatar_url"),
|
||||||
bio: text("bio"),
|
bio: text("bio"),
|
||||||
|
isAdmin: boolean("is_admin").notNull().default(false),
|
||||||
createdAt: timestamp("created_at").defaultNow().notNull(),
|
createdAt: timestamp("created_at").defaultNow().notNull(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user