init
This commit is contained in:
19
database/migrations/1778591348765_create_fanarts_table.js
Normal file
19
database/migrations/1778591348765_create_fanarts_table.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema';
|
||||
export default class extends BaseSchema {
|
||||
tableName = 'fanarts';
|
||||
async up() {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id');
|
||||
table.string('title').notNullable();
|
||||
table.string('author').notNullable();
|
||||
table.string('image_url').notNullable();
|
||||
table.integer('sort_order').defaultTo(0);
|
||||
table.timestamp('created_at');
|
||||
table.timestamp('updated_at');
|
||||
});
|
||||
}
|
||||
async down() {
|
||||
this.schema.dropTable(this.tableName);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=1778591348765_create_fanarts_table.js.map
|
||||
Reference in New Issue
Block a user