tethys.backend/database/migrations/lookup_2_languages.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

37 lines
1.3 KiB
TypeScript

import BaseSchema from '@ioc:Adonis/Lucid/Schema';
export default class Languages extends BaseSchema {
protected tableName = 'languages';
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary().defaultTo("nextval('languages_id_seq')");
table.string('part2_b', 3).notNullable();
table.string('part2_t', 3).notNullable();
table.string('part1', 2).notNullable();
table.string('scope', 20).notNullable();
table.string('type', 20).notNullable();
table.string('ref_name', 150).notNullable();
table.boolean('active').notNullable().defaultTo(true);
});
}
public async down() {
this.schema.dropTable(this.tableName);
}
}
// -- Table: languages
// CREATE TABLE IF NOT EXISTS languages
// (
// id integer NOT NULL DEFAULT nextval('languages_id_seq'::regclass),
// part2_b character varying(3) NOT NULL,
// part2_t character varying(3) NOT NULL,
// part1 character varying(2) NOT NULL,
// scope character varying(20) NOT NULL,
// type character varying(20) NOT NULL,
// ref_name character varying(150) NOT NULL,
// active boolean NOT NULL DEFAULT true,
// CONSTRAINT languages_pkey PRIMARY KEY (id)
// )