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

Initializing default data after create_all() #3

Closed
mtucker502 opened this issue Oct 25, 2021 · 1 comment
Closed

Initializing default data after create_all() #3

mtucker502 opened this issue Oct 25, 2021 · 1 comment

Comments

@mtucker502
Copy link

What is the best method for inserting default data?

Sqlalchemy's event listeners for "on_create" seems like overkill.

Without using Alembic, is there some other SQLmodel'ish way to create initial data?

@mjhea0
Copy link
Contributor

mjhea0 commented Oct 25, 2021

I've only ever done this with an event listener targeting after_create.

@mjhea0 mjhea0 closed this as completed Oct 25, 2021
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

No branches or pull requests

2 participants