diff --git a/src/sql/migrations/20220304184711_schema.js b/src/sql/migrations/20220304184711_schema.js index 2467926d7..d9701d7b2 100644 --- a/src/sql/migrations/20220304184711_schema.js +++ b/src/sql/migrations/20220304184711_schema.js @@ -148,7 +148,7 @@ exports.up = async (knex) => { await knex.schema .createTable('invite_access', (table) => { table.string('user_email', 255).notNullable(); - table.string('experiment_id').notNullable().references('experiment.id'); + table.string('experiment_id').notNullable().references('experiment.id').onDelete('CASCADE'); nativeEnum(table, 'access_role').notNullable(); table.timestamp('updated_at').defaultTo(knex.fn.now());