mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
refactor: controllers and models to adapt them to the previous version of my-links
This commit is contained in:
8
database/default_table_fields.ts
Normal file
8
database/default_table_fields.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export function defaultTableFields(table: Knex.CreateTableBuilder) {
|
||||
table.increments('id', { primaryKey: true }).first().unique().notNullable();
|
||||
|
||||
table.timestamp('created_at').notNullable();
|
||||
table.timestamp('updated_at').nullable();
|
||||
}
|
||||
Reference in New Issue
Block a user