import { BaseSchema } from '@adonisjs/lucid/schema';
export default class extends BaseSchema {
    tableName = 'projects';
    async up() {
        this.schema.createTable(this.tableName, (table) => {
            table.increments('id').primary();
            table.string('document_id', 50).notNullable().unique();
            table.string('title').notNullable();
            table.text('content').nullable();
            table.date('start').nullable();
            table.date('end').nullable();
            table.string('thumbnail_url').nullable();
            table.integer('category_id').unsigned().nullable().references('id').inTable('categories').onDelete('SET NULL');
            table.timestamp('created_at').notNullable();
            table.timestamp('updated_at').nullable();
        });
    }
    async down() {
        this.schema.dropTable(this.tableName);
    }
}
//# sourceMappingURL=1771333780378_create_projects_table.js.map