MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
160 stars 47 forks source link

Use `ALTER` statement for dropping and renaming colmuns #887

Open Kyrela opened 2 weeks ago

Kyrela commented 2 weeks ago

Describe the feature as you'd like to see it

Use the actual ALTER TABLE RENAME COLUMN and ALTER TABLE DROP COLUMN in the PostgresPlatform. Also, creating a temporary colmun instead of a whole temporary table when editing a colmun seems simpler, safer and might be a great addition.

What do we currently have to do now?

Create a new temporary table containing the new modified colmuns, dropping the original one, and re-creating it.

Additional context

See the actual implementation and the official documentation