Untitled
unknown
plain_text
a year ago
1.6 kB
4
Indexable
import * as MigrationHelpers from '@framework/database'; /** * If you have an API-accessible field that should be unique and should generate a 288 status code * if duplication is detected (ie, if client retries on network timeout, but the call made it through) * and the field is not named 'id', 'email', or ends in '_id', then you should include * it in the whitelist in 'mapUniquenessError()' in 'services/database/data_accessor/data_accessor.ts' */ module.exports = MigrationHelpers.migrate( // if adding a new enum, do that before adding a table, then reference the enum by name in addTable MigrationHelpers.addEnum('model_type', 'deadtime_detection_basketball'), // addTable automatically creates `id`, `meta_seq`, `created_at` and `updated_at` fields. // Look at the `config` parameter to change this behavior. MigrationHelpers.addTable('interval', table => { table.uuid('recording_id').notNullable().comment('Id of the recording from video.stream_asset_metadata table'); table.integer('start').comment('milliseconds from clip start to start of interval'); table.integer('end').comment('milliseconds from clip start to end of interval'); table.existingEnum('model_type', 'model_type').notNullable(); table.string('input_version').notNullable(); table.existingEnum('sport', 'sport').notNullable(); table.existingEnum('season_name', 'season').notNullable(); table.integer('season_year').notNullable(); table.index('recording_id', 'interval_recording_id_idx'); }), );
Editor is loading...
Leave a Comment