- add all migration files for database
- npm updates
This commit is contained in:
parent
8a404e8a0c
commit
4abcfe7135
29 changed files with 1540 additions and 375 deletions
40
database/migrations/dataset_6_collection_roles.ts
Normal file
40
database/migrations/dataset_6_collection_roles.ts
Normal file
|
@ -0,0 +1,40 @@
|
|||
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)
|
||||
// )
|
||||
// ALTER TABLE IF EXISTS collections_roles
|
||||
// OWNER to tethys_admin;
|
||||
// REVOKE ALL ON TABLE collections_roles FROM tethys_app;
|
||||
// GRANT ALL ON TABLE collections_roles TO tethys_admin;
|
||||
// GRANT DELETE, UPDATE, INSERT, SELECT ON TABLE collections_roles TO tethys_app;
|
||||
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue