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

feat: add samples for interleave table #18

Merged
merged 6 commits into from
Oct 30, 2023
Merged

feat: add samples for interleave table #18

merged 6 commits into from
Oct 30, 2023

Conversation

@rahul2393 rahul2393 requested a review from olavloite October 25, 2023 07:05
samples/interleave/sample.go Outdated Show resolved Hide resolved
if err := CreateInterleavedTablesIfNotExist(db); err != nil {
return err
}
if err := db.AutoMigrate(&Venue{}, &Concert{}); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we run both AutoMigrate and CreateInterleavedTablesIfNotExists?

Copy link
Owner Author

Choose a reason for hiding this comment

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

yes, since we can't create the interleave tables via AutoMigrate we needed to setup it via CreateInterleavedTablesIfNotExists.

samples/interleave/sample.go Outdated Show resolved Hide resolved
@rahul2393 rahul2393 merged commit 697baa5 into main Oct 30, 2023
8 checks passed
@rahul2393 rahul2393 deleted the add-sample branch October 31, 2023 07:23
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