1575323565424_submissions_schema.js
Home
/
database /
migrations /
1575323565424_submissions_schema.js
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class SubmissionsSchema extends Schema {
up () {
this.create('submissions', (table) => {
table.increments('id')
table.string('name')
table.integer('element_id').notNullable().references('id').inTable('elements')
table.integer('steward_id').notNullable().references('id').inTable('stewards')
table.date('upload_date').notNullable()
table.date('creation_date').notNullable()
table.date('published_date').notNullable()
table.json('metadata').nullable()
table.string('local_file_location').nullable()
table.string('download_file_location').nullable()
table.string('service_location_ags').nullable()
table.string('service_location_agol').nullable()
table.integer('standard_id').references('id').inTable('standards').nullable()
table.boolean('public').notNullable()
table.integer('status_id').notNullable().references('id').inTable('submission_statuses')
table.timestamps()
})
}
down () {
this.drop('submissions')
}
}
module.exports = SubmissionsSchema