Skip to content

Add tags migration 1 #96

Merged
merged 6 commits into from
Mar 29, 2021
Merged

Add tags migration 1 #96

merged 6 commits into from
Mar 29, 2021

Conversation

donald
Copy link
Contributor

@donald donald commented Mar 29, 2021

Add new columns "tags" to mxq_daemon and mxq_group table. Keep the existing columns "prerequisites"

However, we plan a new usage: "tags" is what we have (a list of keywords) and "prerequisites" is what we require from the other side (a boolean expression using the keywords).

mxq_daemon.prerequisites should be renamed to tags. Add the
new name as a new column. The old column prerequisites will be reused
for another purpose.

Make both columns into VARCHAR(1000) for consistency, where 1000 is an
arbitary big enough number.
We want to rename prerequisites to tags. Additionally, we want a new
column prerequisites with new data. However, we can't go the direct
way (CHANGE COLUMN prerequisites tags...), because the running mxqd
processes use the old name.

Create a new column with the new name and copy the data over. We don't
really care to much, if data is lost because a mxq daemon restarts
during the migration phase, because the former prerequisites and now tags
column is only published into the database.

Additionally, fix length of prerequisites from 1024 to 1000.
Add new column tags to mxq_group and change length of prerequisites
for consistency, where 1000 is an arbitary large number.
Add new column tags to mxq_groups.

Additionally, fix length of prerequisites from 1024 to 1000.
@donald donald merged commit 3f78307 into master Mar 29, 2021
@donald donald deleted the add-tags-migration-1 branch October 28, 2022 14:21
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant