24 lines
869 B
JavaScript
24 lines
869 B
JavaScript
exports.up = (pgm) => {
|
|
pgm.createTable('trip_settings', {
|
|
trip_id: {
|
|
type: 'uuid',
|
|
primaryKey: true,
|
|
notNull: true,
|
|
references: 'trips(id)',
|
|
onDelete: 'CASCADE',
|
|
},
|
|
web_research_enabled: { type: 'boolean', notNull: true, default: false },
|
|
periodic_agent_review_enabled: { type: 'boolean', notNull: true, default: false },
|
|
notification_email_enabled: { type: 'boolean', notNull: true, default: true },
|
|
notification_push_enabled: { type: 'boolean', notNull: true, default: true },
|
|
default_research_depth: { type: 'text' },
|
|
default_planning_style: { type: 'text' },
|
|
created_at: { type: 'timestamptz', notNull: true, default: pgm.func('now()') },
|
|
updated_at: { type: 'timestamptz', notNull: true, default: pgm.func('now()') },
|
|
});
|
|
};
|
|
|
|
exports.down = (pgm) => {
|
|
pgm.dropTable('trip_settings');
|
|
};
|