mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(database): 🚑 Fixed migrations not running on fresh databases
Incorrect SQL data in migrations would cause freshly created database to fail migrations
This commit is contained in:
parent
2e2b91d7a5
commit
ac3ef0ea06
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"jest.jestCommandLine": "/home/jessew/.bun/bin/bun test",
|
||||
"jest.rootPath": "."
|
||||
"jest.rootPath": ".",
|
||||
"conventionalCommits.scopes": ["database"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ CREATE TABLE IF NOT EXISTS "User" (
|
|||
"isBot" boolean DEFAULT false NOT NULL,
|
||||
"isLocked" boolean DEFAULT false NOT NULL,
|
||||
"isDiscoverable" boolean DEFAULT false NOT NULL,
|
||||
"sanctions" text[] DEFAULT 'RRAY[',
|
||||
"sanctions" text[],
|
||||
"publicKey" text NOT NULL,
|
||||
"privateKey" text,
|
||||
"instanceId" uuid,
|
||||
|
|
|
|||
|
|
@ -1345,8 +1345,7 @@
|
|||
"name": "sanctions",
|
||||
"type": "text[]",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"default": "'RRAY['"
|
||||
"notNull": false
|
||||
},
|
||||
"publicKey": {
|
||||
"name": "publicKey",
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ export const user = pgTable(
|
|||
isBot: boolean("is_bot").default(false).notNull(),
|
||||
isLocked: boolean("is_locked").default(false).notNull(),
|
||||
isDiscoverable: boolean("is_discoverable").default(false).notNull(),
|
||||
sanctions: text("sanctions").default("RRAY[").array(),
|
||||
sanctions: text("sanctions").array(),
|
||||
publicKey: text("public_key").notNull(),
|
||||
privateKey: text("private_key"),
|
||||
instanceId: uuid("instanceId").references(() => instance.id, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue