Opened 6 years ago
Closed 6 years ago
#30444 closed Cleanup/optimization (fixed)
Refactor `BaseDatabaseSchemaEditor.create_model`
| Reported by: | Rob Golding | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I've been working on a project that uses Citus as the database (which is a Postgres database extension). I found it easy to override methods to change most of the behaviour in the BaseDatabaseSchemaEditor class, but the create_model functionality differs in that it directly executes SQL which it generates itself.
I propose extracting this logic into a table_sql method, similar to how column_sql works.
I'm happy to submit a PR for this work if it sounds like a reasonable improvement!
Change History (3)
comment:1 by , 6 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 6 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
That sounds like a reasonable improvement.