-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stage' into production
- Loading branch information
Showing
34 changed files
with
505 additions
and
43 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
server/src/lib/model/db/migrations/20240409124900-add-variant-reference-to-sentence.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export const up = async function (db: any): Promise<any> { | ||
return db.runSql( | ||
` | ||
ALTER TABLE sentence_metadata | ||
ADD COLUMN variant_id INT UNSIGNED DEFAULT NULL AFTER client_id, | ||
ADD CONSTRAINT sentence_metadata_variant_id_fk FOREIGN KEY (variant_id) REFERENCES variants(id) ON DELETE SET NULL | ||
` | ||
) | ||
} | ||
|
||
export const down = async function (db: any): Promise<any> { | ||
await db.runSql( | ||
`ALTER TABLE sentence_metadata DROP FOREIGN KEY sentence_metadata_variant_id_fk` | ||
) | ||
|
||
await db.runSql(`ALTER TABLE sentence_metadata DROP COLUMN variant_id`) | ||
|
||
return null | ||
} |
13 changes: 13 additions & 0 deletions
13
server/src/lib/model/db/migrations/20240409142600-add-profile-variant-selection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export const up = async function (db: any): Promise<any> { | ||
await db.runSql(` | ||
ALTER TABLE user_client_variants | ||
ADD is_preferred_option TINYINT NOT NULL DEFAULT FALSE | ||
AFTER variant_id | ||
`) | ||
} | ||
|
||
export const down = async function (db: any): Promise<any> { | ||
await db.runSql( | ||
`ALTER TABLE user_client_variants DROP COLUMN is_preferred_option` | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.