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

implement migrate:fresh #861

Closed eaguad1337 closed 7 months ago

eaguad1337 commented 8 months ago

Implements #860

I tested it on MySQL, SQLite and Postgres because I had problems running tests. Hopefully you can help me with this tests @josephmancuso

josephmancuso commented 8 months ago

i just spent a good amount of time trying to get this to work ecause my tables all had foreign key constraints with eachother

eaguad1337 commented 8 months ago

i just spent a good amount of time trying to get this to work ecause my tables all had foreign key constraints with eachother

I added a ignore_fk param and I realized that Postgres fails when trying to use enable_foreign_key_constraints because this method is not implemented. I returned true if sql is None. Let me know if makes sense to you.

josephmancuso commented 8 months ago

hmm now these tests are failing

eaguad1337 commented 8 months ago

removed workaround for not implemented methods in mssql and postgres @josephmancuso

yubarajshrestha commented 7 months ago

@eaguad1337 please fix the linter issues, I believe it's good to have this feature in the framework.