You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20210527174440_create_memberships_table.js 580B

12345678910111213141516
  1. exports.up = function(knex) {
  2. return knex.schema
  3. .createTable('memberships', function(table) {
  4. table.increments('membership_id').primary()
  5. table.integer('user_id').notNullable() // From
  6. table.integer('grouping_id').notNullable() // To
  7. table.string('membership_type', 128).notNullable() // Don't over normalize
  8. table.boolean('can_edit').notNullable()
  9. table.boolean('is_active').notNullable()
  10. })
  11. }
  12. exports.down = function(knex) {
  13. return knex.schema
  14. .dropTable('memberships')
  15. }