You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
625 B
JavaScript
25 lines
625 B
JavaScript
module.exports.up = (knex) =>
|
|
knex.schema.createTable('identity_provider_user', (table) => {
|
|
/* Columns */
|
|
|
|
table.bigInteger('id').primary().defaultTo(knex.raw('next_id()'));
|
|
table.timestamp('created_at', true);
|
|
table.timestamp('updated_at', true);
|
|
|
|
table
|
|
.bigInteger('user_id')
|
|
.notNullable()
|
|
.references('id')
|
|
.inTable('user_account')
|
|
.onDelete('CASCADE');
|
|
|
|
table.text('issuer').notNullable();
|
|
table.text('sub').notNullable();
|
|
|
|
/* Indexes */
|
|
|
|
table.index('user_id');
|
|
});
|
|
|
|
module.exports.down = (knex) => knex.schema.dropTable('identity_provider_user');
|