18 lines
383 B
JavaScript
18 lines
383 B
JavaScript
exports.up = async knex => {
|
|
await knex.schema.createTable('users', table => {
|
|
table.uuid('id')
|
|
.primary()
|
|
.defaultTo(knex.raw('gen_random_uuid()'));
|
|
|
|
table.string('discogs')
|
|
.unique();
|
|
|
|
table.jsonb('data')
|
|
.notNullable();
|
|
|
|
table.timestamps(true, true);
|
|
});
|
|
};
|
|
|
|
exports.down = async () => true;
|