Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update orchestrate.rb #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sunilgandipadala
Copy link

Renamed Old table name format

Renamed Old table name format
@@ -31,7 +31,7 @@ def setup_store
# Set this early on to ensure their creation and cleanup (unexpected)
# happens at all times. IOW, the calls from Store.get always return
# the same value.
Store.set(:old_primary_table, "pgosc_op_table_#{client.table.downcase}")
Store.set(:old_primary_table, "pgosc_op_table_#{client.table.downcase}_#{pgosc_identifier}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the spec is failing due to the length. We would like to keep this length to 20 or maybe 21 characters, to not accidentally overflow in case the actual table name is longer and then result into production errors, since PG has a table name length limit.

Do you want to see if you can repurpose the logic here to perhaps add an index (numeric). For example pgosc_op_table_foobar_1.

Note: If _1 already exists, then it should automatically increment the index from the previous value.

It requires updating a few code paths and specs, so I am happy to take it over too. Let me know 🙌🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants