Skip to content

Commit

Permalink
Add forgotten DB migration
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Apr 5, 2024
1 parent 0fe144d commit 0f2f989
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/datastore/postgres/schema/v17.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { IDatabase } from "pg-promise";

export const runSchema = async(db: IDatabase<unknown>) => {
await db.none(`
ALTER TABLE events DROP CONSTRAINT cons_events_unique;
`);

await db.none(`
ALTER TABLE events ADD CONSTRAINT cons_events_unique UNIQUE(eventid, roomid, slackchannel, slackts, extras);
`);
};

0 comments on commit 0f2f989

Please sign in to comment.