Initial commit
This commit is contained in:
19
database/migrations/1771372277645_create_images_table.js
Normal file
19
database/migrations/1771372277645_create_images_table.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema';
|
||||
export default class extends BaseSchema {
|
||||
tableName = 'images';
|
||||
async up() {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id');
|
||||
table.string('file_path').notNullable();
|
||||
table.string('original_name').notNullable();
|
||||
table.string('mime_type').notNullable();
|
||||
table.integer('size').notNullable();
|
||||
table.timestamp('created_at');
|
||||
table.timestamp('updated_at');
|
||||
});
|
||||
}
|
||||
async down() {
|
||||
this.schema.dropTable(this.tableName);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=1771372277645_create_images_table.js.map
|
||||
Reference in New Issue
Block a user