fix(core): preserve credential schema compatibility
This commit is contained in:
parent
5f77482a29
commit
7793db3ac8
6 changed files with 100 additions and 36 deletions
|
|
@ -5,11 +5,21 @@ export default {
|
|||
id: "20260611192811_lush_chimera",
|
||||
up(tx) {
|
||||
return Effect.gen(function* () {
|
||||
yield* tx.run(`ALTER TABLE \`credential\` ADD \`integration_id\` text NOT NULL;`)
|
||||
yield* tx.run(`DROP INDEX IF EXISTS \`credential_connector_active_idx\`;`)
|
||||
yield* tx.run(`ALTER TABLE \`credential\` DROP COLUMN \`connector_id\`;`)
|
||||
yield* tx.run(`ALTER TABLE \`credential\` DROP COLUMN \`method_id\`;`)
|
||||
yield* tx.run(`ALTER TABLE \`credential\` DROP COLUMN \`active\`;`)
|
||||
yield* tx.run(`DROP TABLE \`credential\`;`)
|
||||
yield* tx.run(`
|
||||
CREATE TABLE \`credential\` (
|
||||
\`id\` text PRIMARY KEY,
|
||||
\`integration_id\` text,
|
||||
\`label\` text NOT NULL,
|
||||
\`value\` text NOT NULL,
|
||||
\`connector_id\` text,
|
||||
\`method_id\` text,
|
||||
\`active\` integer,
|
||||
\`time_created\` integer NOT NULL,
|
||||
\`time_updated\` integer NOT NULL
|
||||
);
|
||||
`)
|
||||
})
|
||||
},
|
||||
} satisfies DatabaseMigration.Migration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue