- add methods for releasing datasets from submitter

- npm updates
- side menu with child items
- flash messages via HttpContext response (extended via macro)
This commit is contained in:
Kaimbacher 2023-06-27 18:23:18 +02:00
parent e0ff71b117
commit f403c3109f
37 changed files with 1020 additions and 482 deletions

View file

@ -34,4 +34,4 @@ export default class Projects extends BaseSchema {
// OWNER to tethys_admin;
// REVOKE ALL ON TABLE projects FROM tethys_app;
// GRANT ALL ON TABLE projects TO tethys_admin;
// GRANT DELETE, UPDATE, INSERT, SELECT ON TABLE projects TO tethys_app;
// GRANT DELETE, UPDATE, INSERT, SELECT ON TABLE projects TO tethys_app;

View file

@ -37,4 +37,3 @@ export default class CollectionsRoles extends BaseSchema {
// 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;

View file

@ -6,7 +6,7 @@ export default class Collections extends BaseSchema {
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').defaultTo("nextval('collections_id_seq')");
table.integer('role_id').unsigned();
table.integer('role_id').unsigned();
table
.foreign('role_id', 'collections_role_id_foreign')
.references('id')
@ -58,4 +58,4 @@ export default class Collections extends BaseSchema {
// OWNER to tethys_admin;
// REVOKE ALL ON TABLE collections FROM tethys_app;
// GRANT ALL ON TABLE collections TO tethys_admin;
// GRANT DELETE, INSERT, SELECT, UPDATE ON TABLE collections TO tethys_app;
// GRANT DELETE, INSERT, SELECT, UPDATE ON TABLE collections TO tethys_app;

View file

@ -7,18 +7,18 @@ export default class LinkDocumentsCollections extends BaseSchema {
this.schema.createTable(this.tableName, (table) => {
table.integer('collection_id').index('link_documents_collections_collection_id_index').notNullable();
table
.foreign('collection_id', 'link_documents_collections_collection_id_foreign')
.references('id')
.inTable('collections')
.onDelete('CASCADE') // don't delete this when collection is deleted
.onUpdate('CASCADE');
.foreign('collection_id', 'link_documents_collections_collection_id_foreign')
.references('id')
.inTable('collections')
.onDelete('CASCADE') // don't delete this when collection is deleted
.onUpdate('CASCADE');
table.integer('document_id').index('link_documents_collections_document_id_index').notNullable();
table
.foreign('document_id', 'link_documents_collections_document_id_foreign')
.references('id')
.inTable('documents')
.onDelete('CASCADE') // don't delete this when document is deleted
.onUpdate('CASCADE');
.foreign('document_id', 'link_documents_collections_document_id_foreign')
.references('id')
.inTable('documents')
.onDelete('CASCADE') // don't delete this when document is deleted
.onUpdate('CASCADE');
table.primary(['collection_id', 'document_id']);
});
}
@ -56,4 +56,4 @@ export default class LinkDocumentsCollections extends BaseSchema {
// -- Index: link_documents_collections_document_id_index
// -- DROP INDEX IF EXISTS link_documents_collections_document_id_index;
// CREATE INDEX IF NOT EXISTS link_documents_collections_document_id_index
// ON link_documents_collections USING btree (document_id ASC);
// ON link_documents_collections USING btree (document_id ASC);

View file

@ -29,7 +29,6 @@ export default class Persons extends BaseSchema {
}
}
// -- Table: persons
// CREATE TABLE IF NOT EXISTS persons
// (

View file

@ -15,12 +15,12 @@ export default class LinkDocumentsLicences extends BaseSchema {
// table.index('licence_id', 'link_documents_licences_licence_id_index')
table.integer('document_id').index('link_documents_licences_document_id_index').notNullable();
table
.foreign('document_id', 'link_documents_licences_document_id_foreign')
.references('id')
.inTable('documents')
.onDelete('CASCADE') // delete this when document is deleted
.onUpdate(' CASCADE');
// table.index('licence_id', 'link_documents_licences_document_id_index')
.foreign('document_id', 'link_documents_licences_document_id_foreign')
.references('id')
.inTable('documents')
.onDelete('CASCADE') // delete this when document is deleted
.onUpdate(' CASCADE');
// table.index('licence_id', 'link_documents_licences_document_id_index')
table.primary(['licence_id', 'document_id']);
});
}

View file

@ -34,4 +34,4 @@ export default class MimeTypes extends BaseSchema {
// OWNER to tethys_admin;
// REVOKE ALL ON TABLE mime_types FROM tethys_app;
// GRANT ALL ON TABLE mime_types TO tethys_admin;
// GRANT DELETE, UPDATE, INSERT, SELECT ON TABLE mime_types TO tethys_app;
// GRANT DELETE, UPDATE, INSERT, SELECT ON TABLE mime_types TO tethys_app;