import { MigrationSchema } from '../../src/index.js';
export const migration = {
    async up(db) {
        const schema = MigrationSchema.create(db);
        await schema.create('tasks', (table) => {
            table.id();
            table.string('title');
            table.text('description').nullable();
            table.string('status').default('pending');
            table.integer('user_id');
            table.foreign('user_id').references('id').on('users').onDelete('CASCADE');
            table.timestamps();
        });
    },
    async down(db) {
        const schema = MigrationSchema.create(db);
        await schema.dropIfExists('tasks');
    },
};
