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.

I want to change order of table creation for create_tables()

See original GitHub issue

Basically, I need to make Peewee know that some of my tables are inherited from other tables, and this means that the «parents» should be created before «children».

Can you please move some logic out from sort_models_topologically(), so that I could override it in my classes and customize list of a table’s dependencies (which now includes only those tables to which it has foreign keys referencing)? Or, could you make support for inheritance in Peewee natively?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
coleifercommented, Oct 11, 2016

Not on pip yet, but next release will be soon… I’ll shoot for within the next few days

0reactions
maaakscommented, Apr 10, 2017

Please check this, it seems to fix the problem. By the way, I got rid of the reversed(reversed()) style of the sorting process because it made harder to understand what’s going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create and format tables - Microsoft Support
To format existing data as a table by using the default table style, do this: Select the cells containing the data. Click Home...
Read more >
createTable | Liquibase Docs
To create a table for your database, follow these steps: Step 1: Add the createTable Change Type to your changeset with the needed...
Read more >
CreateTable - Amazon DynamoDB - AWS Documentation
In an AWS account, table names must be unique within each Region. That is, you can have two tables with same name if...
Read more >
Chapter 4. Creating Databases and Tables - O'Reilly
Creating Databases and Tables In order to be able to add and manipulate data, you first have to create a database. There's not...
Read more >
Documentation: 15: CREATE TABLE - PostgreSQL
Therefore, tables cannot have the same name as any existing data type in the same schema. The optional constraint clauses specify constraints (tests)...
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