Skip to content
Snippets Groups Projects
Verified Commit 450b0122 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: external ids

parent 2280def3
No related branches found
No related tags found
3 merge requests!17Release 6.0,!15External String IDs,!11DRAFT: file system cleanup
Pipeline #32019 passed
......@@ -21,10 +21,3 @@ 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.';
ALTER TABLE null_data CHANGE property_id property_id INT UNSIGNED NOT NULL;
ALTER TABLE text_data CHANGE property_id property_id INT UNSIGNED NOT NULL;
ALTER TABLE double_data CHANGE property_id property_id INT UNSIGNED NOT NULL;
ALTER TABLE integer_data CHANGE property_id property_id INT UNSIGNED NOT NULL;
ALTER TABLE reference_data CHANGE property_id property_id INT UNSIGNED NOT NULL;
ALTER TABLE enum_data CHANGE property_id property_id INT UNSIGNED NOT NULL;
......@@ -22,7 +22,7 @@
# Update mysql schema to version v5.0.0
# Drop the 'rules' table.
NEW_VERSION="v5.0.1"
NEW_VERSION="v6.0.0-SNAPSHOT-EXTIDS"
OLD_VERSION="v5.0.0"
if [ -z "$UTILSPATH" ]; then
......@@ -31,11 +31,11 @@ fi
. $UTILSPATH/patch_header.sh $*
# check_version $OLD_VERSION
check_version $OLD_VERSION
mysql_execute_file $PATCH_DIR/create_entity_ids_table.sql
# update_version $NEW_VERSION
update_version $NEW_VERSION
success
......@@ -2509,13 +2509,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','getFileIdByPa
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','getFileIdByPath','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','getFileIdByPath','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.getRole
SELECT tap.has_procedure('_caosdb_schema_unit_tests','getRole','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','getRole','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','getRole','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','getRole','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.initAutoIncrement
SELECT tap.has_procedure('_caosdb_schema_unit_tests','initAutoIncrement','');
......@@ -2677,13 +2670,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','registerTempT
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','registerTempTableName','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','registerTempTableName','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.retrieveDatatype
SELECT tap.has_procedure('_caosdb_schema_unit_tests','retrieveDatatype','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','retrieveDatatype','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','retrieveDatatype','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','retrieveDatatype','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.retrieveEntityParents
SELECT tap.has_procedure('_caosdb_schema_unit_tests','retrieveEntityParents','');
......@@ -2691,13 +2677,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','retrieveEntit
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','retrieveEntityParents','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','retrieveEntityParents','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.setPassword
SELECT tap.has_procedure('_caosdb_schema_unit_tests','setPassword','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','setPassword','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','setPassword','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','setPassword','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.insertIsa
SELECT tap.has_procedure('_caosdb_schema_unit_tests','insertIsa','');
......
......@@ -95,6 +95,7 @@ SELECT tap.eq(@x, 0, "no versions there any more");
-- TEARDOWN clean up
DELETE FROM name_data WHERE entity_id > 99;
DELETE FROM entity_ids WHERE internal_id > 99;
DELETE FROM entities WHERE id > 99;
-- #####################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment