AdvancedPhotonSource / ComponentDB

Other
10 stars 20 forks source link

Two sql files are missing #657

Closed jeonghanlee closed 2 years ago

jeonghanlee commented 4 years ago

Hi @iTerminate,

While configuring MariaDB database, I have issues that two sql files are missing. I don't use the provided scripts (for MariaDB) in order to understand their sql dependencies, because I use the system provided MariaDB instead of support one. So far with the latest commit def2da9, I can create all tables, views, and stored_procedures, and fill all data by using sql files within db/sql/{static,clean} except the following two sql files.

One is populate_item_element_history.sql and the other is populate_property_metadata_history.sql. According to the following codes:

https://github.com/AdvancedPhotonSource/ComponentDB/blob/def2da906dc1aaf277d66989fcbb223a07ff8511/sbin/cdb_create_db.sh#L222

https://github.com/AdvancedPhotonSource/ComponentDB/blob/def2da906dc1aaf277d66989fcbb223a07ff8511/sbin/cdb_create_db.sh#L255

I think, they are in the db/sql/clean path according to sbin/cdb_create_db.sh, but I cannot find them in that path. It looks like one (item_element_history) of codes remains in `update/updateTo3.9.0.sql such as

https://github.com/AdvancedPhotonSource/ComponentDB/blob/def2da906dc1aaf277d66989fcbb223a07ff8511/db/sql/updates/updateTo3.9.0.sql#L17-L45

https://github.com/AdvancedPhotonSource/ComponentDB/blob/def2da906dc1aaf277d66989fcbb223a07ff8511/db/sql/updates/updateTo3.9.0.sql#L53-L98

But I cannot find any information on populate_property_metadata_history.sql.

Could you help me to move a bit further about configuring it?

Thanks

@jeonghanlee

jeonghanlee commented 4 years ago

With make clean-db, I've found two following messages

populate_item_element_history.sql not found, skipping item_element_history update
.....
populate_property_metadata_history.sql not found, skipping property_metadata_history update

So, the script cdb_create_db.bash cannot stop even if there is a missing sql file.

Is it ok to run cdb without two sql configurations? Or should we add two files properly when we configure the mysql (mariaDB) from scratch?

iTerminate commented 4 years ago

Hi @jeonghanlee let me resolve this. These tables I've added more recently and forgot to include the clean ones.