Skip to content

Commit

Permalink
fix migration to reproducible smh
Browse files Browse the repository at this point in the history
  • Loading branch information
Anarchy Server v2 committed Apr 1, 2024
1 parent 1a2f4bb commit f5997b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions migrations/1705422363022_add-store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
exports.up = (pgm) => {
pgm.createExtension("uuid-ossp", {ifNotExists: true});
pgm.createType('item_type', ['font', 'background', 'line_style', 'misc'])
pgm.createTable('items', {
id: { type: 'string', primaryKey: true },
Expand Down Expand Up @@ -33,11 +34,14 @@ exports.up = (pgm) => {
pgm.addConstraint('purchases', 'already_owned', {
unique: ['itemid', 'userid']
})


}

exports.down = (pgm) => {
pgm.dropConstraint('purchases', 'already_owned')
pgm.dropTable('purchases')
pgm.dropTable('items')
pgm.dropType('item_type')
pgm.dropExtension("uuid-ossp")
}

0 comments on commit f5997b1

Please sign in to comment.