mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
feat: add create link form
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema';
|
||||
|
||||
export default class extends BaseSchema {
|
||||
protected tableName = 'collection_link';
|
||||
|
||||
async up() {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table
|
||||
.uuid('collection_id')
|
||||
.references('id')
|
||||
.inTable('collections')
|
||||
.onDelete('CASCADE');
|
||||
table
|
||||
.uuid('link_id')
|
||||
.references('id')
|
||||
.inTable('links')
|
||||
.onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.schema.dropTable(this.tableName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user