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 table creation on schema migration #2244

Closed
wants to merge 8 commits into from

Conversation

bz888
Copy link
Contributor

@bz888 bz888 commented Feb 5, 2024

Description

Schema migraiton should be an autonomous action that should be in one transaction
Hence, we can not use sequelize.sync(), as if migration were to fail, table creation would still be executed

Tests on

  • Cyclic schema
  • Historical (complex schema, multiple relationals)
  • Non-historical (complex schema, multiple relationals)
  • QueryGenerators

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

@bz888 bz888 force-pushed the fix/create-table-migration branch from 8c2e806 to cc23277 Compare February 8, 2024 04:36
packages/node-core/src/utils/sync-helper.spec.ts Outdated Show resolved Hide resolved
packages/node-core/src/utils/sync-helper.ts Outdated Show resolved Hide resolved
packages/node-core/src/indexer/store.service.ts Outdated Show resolved Hide resolved
@bz888
Copy link
Contributor Author

bz888 commented Feb 12, 2024

Closing this pr in favour of #2251

@bz888 bz888 closed this Feb 12, 2024
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.

2 participants