Initial commit
This commit is contained in:
17
database/migrations/1771333780374_create_music_table.js
Normal file
17
database/migrations/1771333780374_create_music_table.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema';
|
||||
export default class extends BaseSchema {
|
||||
tableName = 'music';
|
||||
async up() {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id').primary();
|
||||
table.string('name').notNullable();
|
||||
table.string('url').notNullable();
|
||||
table.timestamp('created_at').notNullable();
|
||||
table.timestamp('updated_at').nullable();
|
||||
});
|
||||
}
|
||||
async down() {
|
||||
this.schema.dropTable(this.tableName);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=1771333780374_create_music_table.js.map
|
||||
Reference in New Issue
Block a user