question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

To 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:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
grigicommented, Aug 26, 2019

Released v0.13.1

1reaction
grigicommented, Aug 20, 2019

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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found