1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00
planka/server/db/migrations/20180722003614_create_card.js
2019-10-05 06:12:36 +05:00

25 lines
638 B
JavaScript
Executable file

module.exports.up = knex =>
knex.schema.createTable('card', table => {
/* Columns */
table.increments();
table.integer('list_id').notNullable();
table.integer('board_id').notNullable();
table.specificType('position', 'double precision').notNullable();
table.text('name').notNullable();
table.text('description');
table.timestamp('dueDate', true);
table.jsonb('timer');
table.timestamp('created_at', true);
table.timestamp('updated_at', true);
/* Indexes */
table.index('list_id');
table.index('position');
});
module.exports.down = knex => knex.schema.dropTable('card');