tethys.backend/database/migrations/dataset_6_collection_roles.ts
Arno Kaimbacher 4714dfdd94 - use latest prettier 3.0 with eslint-plugin-prettier: 5.0.0-alpha.2
- npm normal updates
- add all xslt and style asstes in extra folder public/assets2
- linting corrections
- delete local .env.test from git tracking: git rm --cached .env.test
- add .env.test into .gitignore file
- add edit functionality for editing by submitter
- npm updates
-added xslt3 packeage for builfing sef files
- added Language.ts class vor language table
- added version to datasetxml2oai-pmh.xslt
2023-07-17 19:13:30 +02:00

36 lines
1.3 KiB
TypeScript

import BaseSchema from '@ioc:Adonis/Lucid/Schema';
export default class CollectionsRoles extends BaseSchema {
protected tableName = 'collections_roles';
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary().defaultTo("nextval('collections_roles_id_seq')");
table.string('name', 255).notNullable();
table.string('oai_name', 255).notNullable();
table.integer('position').notNullable();
table.boolean('visible').notNullable().defaultTo(true);
table.boolean('visible_frontdoor').notNullable().defaultTo(true);
table.boolean('visible_oai').notNullable().defaultTo(true);
});
}
public async down() {
this.schema.dropTable(this.tableName);
}
}
// -- Table: collection roles
// CREATE TABLE IF NOT EXISTS collections_roles
// (
// id integer NOT NULL DEFAULT nextval('collections_roles_id_seq'::regclass),
// name character varying(255) NOT NULL,
// oai_name character varying(255) NOT NULL,
// "position" integer NOT NULL,
// visible boolean NOT NULL DEFAULT true,
// visible_frontdoor boolean NOT NULL DEFAULT true,
// visible_oai boolean NOT NULL DEFAULT true,
// CONSTRAINT collections_roles_pkey PRIMARY KEY (id)
// )