dysath / seat-fitting

A Fitting/Doctrine module for SeAT
GNU General Public License v2.0
14 stars 21 forks source link

Dont want to reinstall Seat: Help populate new database #50

Closed Jammersonthe3rd closed 4 years ago

Jammersonthe3rd commented 4 years ago

the database got corrupted when i imported a fitting "a known bug" but how would i reinstall and force the database to be remade

I have tried uninstalling and reinstalling with composer and deleting the sql databases to hopefully have the repopulate. Love some help.

warlof commented 4 years ago

If you really want to reset all your database and loose all data, you can use php artisan migrate:fresh. THIS WILL DROP ALL TABLES and built fresh ones by running all migrations. Be certain of your move though, as this action will not impact the plugin only.

Before doing this, I suggest you do the following :

The query bellow will remove the fitting from your database (be sure to replace PUT_YOUR_ANNOYING_FIT_NAME_HERE accordingly).

DELETE FROM seat_doctrine_fitting WHERE fitting_id = (SELECT id FROM seat_fitting WHERE fitname = 'PUT_YOUR_ANNOYING_FIT_NAME_HERE');
DELETE FROM seat_fitting WHERE fitname = 'PUT_YOUR_ANNOYING_FIT_NAME_HERE';

The query bellow will empty only the plugin fitting table (all of them)

DELETE FROM seat_doctrine_fitting;
DELETE FROM seat_fitting;
Jammersonthe3rd commented 4 years ago

Thank you. I will try that command. the problem i ran into was when i added the fit it corrupted the table for some reason so i removed it all and messed it up vOv

Crypta-Eve commented 4 years ago

I would like to add that it is unlikely that it corrupted the database and more that you had an invalid item name in your fit for the sde that was installed in your seat instance.

There is a command added in a coming update which will fix issues such as this. I am closing this issue now, if you need to feel free to reopen.