exports.up = (pgm) => { pgm.createTable('videos', { id: 'id', gnommo_id: { type: 'varchar(50)', notNull: true, unique: true }, course_code: { type: 'varchar(100)' }, title: { type: 'varchar(500)', notNull: true }, description: { type: 'text' }, hook: { type: 'text' }, status: { type: 'varchar(50)' }, resolution_width: { type: 'integer' }, resolution_height: { type: 'integer' }, fps: { type: 'integer' }, default_slide_type: { type: 'varchar(50)' }, background: { type: 'varchar(500)' }, platform_targets: { type: 'jsonb' }, duration_seconds: { type: 'numeric' }, youtube_url: { type: 'varchar(500)' }, raw_project_json: { type: 'jsonb' }, created_at: { type: 'timestamptz', notNull: true, default: pgm.func('NOW()') }, updated_at: { type: 'timestamptz', notNull: true, default: pgm.func('NOW()') }, }); pgm.createIndex('videos', 'gnommo_id', { name: 'idx_videos_gnommo_id' }); }; exports.down = (pgm) => { pgm.dropTable('videos'); };