-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dropAllTables #161
dropAllTables #161
Conversation
Co-authored-by: Takayasu Oyama <[email protected]>
Co-authored-by: Takayasu Oyama <[email protected]>
Co-authored-by: Takayasu Oyama <[email protected]>
Dropping all the tables by dropping the database is not ideal. |
Yea its far from ideal haha, the only other thing I can think to do is a bit of a hack (but it works) is to get the generated sql queries from all migrations |
How about getting all the indexes and tables from |
That seems much better, is there a similar method for foreign keys? |
Also I see there is no method to compile a foreign key listing, but I can make on in the Grammar |
|
Ye sorry my mistake, IDE wasnt picking it up for some reason |
So I modified phpunit.xml to have 2 directories nodes in the testsuite, both pointing to /tests but the first uses the normal suffix Test.php, and the second uses TestLast.php. This allows any test cases that need to be run at the end to do so. Schema/BuilderTest.php has been renamed to BuilderTestLast.php, so the dropAll test will happen right at the end |
Hmm that appears not to be working without the override |
Seems like there's a binding missing?
|
Yes in reality the newer Laravel way of doing things required a I have also aligned |
Update: doing a proper step by step drop of all tables/indexes/foreign keys
As the title says - a command to drop all tables might as well just drop the database and remake it, and this makes the
migrate:fresh
command work properlyI am not sure if I have accessed the connection the correct way, eg
DB::connection()
. Also theres no tests as of yet