Comments (2)
Thanks for help @paolodina!
Exactly like @paolodina said @Erhannis you need to create the database if you do not connect to existing one.
For simple use cases migration can be a overkill so method described above should suffice.
Was about to update the Quick Start for some time already so this issue was finally a motivation.
Please check the new/updated quick start at https://collerek.github.io/ormar/ (or in pypi).
Added some info, disclaimers, links, divided all into functional blocks and made it runnable in full.
Hope that helps!
P.S. If you like ormar
don't forget to star the repo and spread the news about it - let's build a community around ormar
so it's easier to catch bugs and find contributors.
from ormar.
You should initialize the database before using it.
Indeed the quickstart page didn't say this explicitly, it'd be probably a good idea to add to the quickstart page a link to the "Migrations/Database Initialization" docs, or maybe add the snippet for convenience and the link for details.
You should be all set after:
import sqlalchemy
engine = sqlalchemy.create_engine("sqlite:///test.db")
definition metadata.create_all(engine)
from ormar.
Related Issues (20)
- Getting `KeyError` when using `.exclude` in a `QuerySetProxy`
- Migrate to Pydantic V2 HOT 14
- use snake case for table names in the database
- Multiple reverse relations not working.
- Add `first_or_none`
- FastpAPI state has not database HOT 4
- How to configure alembic autogenerate with multiple model files HOT 5
- Error awaiting None
- Upgrade to SQLAlchemy 2.0 HOT 5
- Add SELECT DISTINCT feature to queryset
- Failing test: test_weakref_init
- Reverse relation not returned from get_pydantic
- Low performance on select_all() call HOT 1
- Nullable ForeignKey field does not get updated to null
- The future of ORMAR HOT 6
- Support specifying a table comment
- Please support pydantic-2.x HOT 3
- New release with the latest dependency upgrades HOT 2
- Unresolved attribute reference 'objects'
- Model field types and pyright
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ormar.