diff options
Diffstat (limited to 'db/migrations/20210612181508_init_referrals.js')
| -rw-r--r-- | db/migrations/20210612181508_init_referrals.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/db/migrations/20210612181508_init_referrals.js b/db/migrations/20210612181508_init_referrals.js deleted file mode 100644 index 63b20ce4..00000000 --- a/db/migrations/20210612181508_init_referrals.js +++ /dev/null @@ -1,24 +0,0 @@ -export const up = function(knex) { - return Promise.all([ - knex.schema.dropTableIfExists('referrals'), - - knex.schema.createTable('referrals', function(t) { - t.increments('id').unsigned().primary(); - t.integer('user_id').nullable(); - t.foreign('user_id').references('users.id'); - - t.integer('sponsor_id').notNull(); - t.foreign('sponsor_id').references('users.id'); - - t.string('token').notNull(); - t.string('expiry').nullable(); - t.enum('status', ['available', 'used', 'expired', 'cancelled']).notNull().defaultTo('available'); - - t.timestamps(true, true); - }) - ]) -}; - -export const down = function(knex) { - return knex.schema.dropTable('referrals'); -}; |
