Selecting schema
See original GitHub issueTo include in db config (or elsewhere) which existing schema should be used. Currently, there is no option that enables specifying schema.
For example:
{
'connections': {
# Dict format for connection
'default': {
'engine': 'tortoise.backends.asyncpg',
'credentials': {
'host': 'localhost',
'port': '5432',
'user': 'tortoise',
'password': 'qwerty123',
'database': 'test',
'schema': 'test_schema'
}
},
# Using a DB_URL string
'default': 'postgres://postgres:qwerty123@localhost:5432/events'
},
'apps': {
'models': {
'models': ['__main__'],
# If no default_connection specified, defaults to 'default'
'default_connection': 'default',
}
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How to select a schema in postgres when using psql?
In PostgreSQL the system determines which table is meant by following a search path, which is a list of schemas to look in....
Read more >How to use INFORMATION_SCHEMA Views in SQL Server
INFORMATION_SCHEMA Views allow you to find what tables are in your schema. ... SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS.
Read more >USE SCHEMA - Snowflake Documentation
Specifies the active/current schema for the session. If a database and schema, also known as a namespace, are not specified for a user...
Read more >A Walkthrough of SQL Schema - SQLShack
Change SQL schema of an existing object in SQL Server · Right-click on the specific table name and choose Design option: · It...
Read more >Documentation: 15: 5.9. Schemas - PostgreSQL
A database contains one or more named schemas, which in turn contain tables. ... Only qualified names will choose public schema objects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released v0.13.1
Yeah, I don’t see any other way. This does mean we will have to introduce DB-specific setup in the tests though. So far have only used DB’s in default config for testing.
Possibly can do so just by manual testing for now, and add a TODO that we want to automate it at a later stage (When we have more such cases)