Skip to content

Migration table schema #895

Answered by dantownsend
illyria1 asked this question in Q&A
Oct 31, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

It's a good point - currently migrations assume the default schema is being used.

I'll have to add this as a new feature. Probably allowing the user to specify it in piccolo_conf.py.

In the mean time, the solutions are:

Modify your local copy of Piccolo

Change this line:

https://github.com/piccolo-orm/piccolo/blob/28fe3a4fe3266d17c7a37406dc7fdbd92223d5f6/piccolo/apps/migrations/tables.py#L10C1-L10C24

To this instead:

class Migration(Table, schema="my_schema"):

Copy the migrations app into your project

Copy this entire folder into your project:

https://github.com/piccolo-orm/piccolo/tree/master/piccolo/apps/migrations

You might have to change this line to something like 'my_migrations':

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@illyria1
Comment options

Answer selected by illyria1
Comment options

You must be logged in to vote
4 replies
@dantownsend
Comment options

@aabmets
Comment options

@dantownsend
Comment options

@AlexanderMakarov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants