Skip to content
Snippets Groups Projects
Select Git revision
  • 1495fad31cd26d0dfcfecd5026b232c658f546e6
  • main default protected
  • f-pipeline-timeout
  • dev protected
  • f-fix-accent-sensitivity
  • f-filesystem-import
  • f-update-acl
  • f-filesystem-link
  • f-filesystem-directory
  • f-filesystem-core
  • f-filesystem-cleanup
  • f-string-ids
  • f-filesystem-main
  • f-multipart-encoding
  • f-trigger-advanced-user-tools
  • f-real-rename-test-pylibsolo2
  • f-real-rename-test-pylibsolo
  • f-real-rename-test
  • f-linkahead-rename
  • f-reference-record
  • f-xml-serialization
  • linkahead-pylib-v0.18.0
  • linkahead-control-v0.16.0
  • linkahead-pylib-v0.17.0
  • linkahead-mariadbbackend-v8.0.0
  • linkahead-server-v0.13.0
  • caosdb-pylib-v0.15.0
  • caosdb-pylib-v0.14.0
  • caosdb-pylib-v0.13.2
  • caosdb-server-v0.12.1
  • caosdb-pylib-v0.13.1
  • caosdb-pylib-v0.12.0
  • caosdb-server-v0.10.0
  • caosdb-pylib-v0.11.1
  • caosdb-pylib-v0.11.0
  • caosdb-server-v0.9.0
  • caosdb-pylib-v0.10.0
  • caosdb-server-v0.8.1
  • caosdb-pylib-v0.8.0
  • caosdb-server-v0.8.0
  • caosdb-pylib-v0.7.2
41 results

test_query.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    create_entity_ids_table.sql 1.06 KiB
    -- a little bit of house keeping
    DROP PROCEDURE IF EXISTS retrieveSubEntity;
    DROP PROCEDURE IF EXISTS retrieveDatatype;
    DROP PROCEDURE IF EXISTS retrieveGroup;
    
    -- new entity_ids table
    DROP TABLE IF EXISTS `entity_ids`;
    CREATE TABLE `entity_ids` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `internal_id` int(10) unsigned NOT NULL COMMENT 'Internal ID of an entity. This id is used internally in the *_data tables and elsewhere. This ID is never exposed via the CaosDB API.',
        PRIMARY KEY `entity_ids_pk` (`id`),
        CONSTRAINT `entity_ids_internal_id` FOREIGN KEY (`internal_id`) REFERENCES `entities` (`id`)
    ) ENGINE=InnoDB;
    
    -- fill all existing entities into the new entity_ids table.
    INSERT INTO entity_ids (id, internal_id) SELECT id, id FROM entities WHERE id>0;
    INSERT INTO entity_ids (id, internal_id) SELECT id, id FROM entities WHERE id=0;
    UPDATE entity_ids SET id = internal_id;
    -- ALTER TABLE entity_ids CHANGE id id int(10) unsigned NOT NULL AUTO_INCREMENT  COMMENT 'External ID of an entity. This is the id of an entity which is exposed via the CaosDB API.';