/**
 * Migration: AddDoneTasksTable
 * Modifies tasks table
 */
import { Schema as MigrationSchema } from '../../src/migrations/schema';
export const migration = {
    /**
     * Run migration
     */
    async up(db) {
        const schema = MigrationSchema.create(db);
        const alreadyHas = await schema.hasColumn('tasks', 'done');
        if (alreadyHas)
            return;
        await schema.table('tasks', (table) => {
            table.string('done');
        });
    },
    /**
     * Rollback migration
     */
    async down(_db) {
        // Note: dropping columns/FKs varies by driver; SQLite/D1 requires a table rebuild.
    },
};
