mardi 27 novembre 2018

Truncate a table base on database connection in Laravel 5

I have a database connection nuc I have a table name Alerts

I'm trying to truncate that table by doing this

DB::connection('nuc')->statement('TRUNCATE Alerts');

I kept getting

enter image description here

QueryException in Connection.php line 629: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "alerts" does not exist (SQL: TRUNCATE Alerts)

How do I force truncate a table base on database connection?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2SeXohq
via IFTTT

Aucun commentaire:

Enregistrer un commentaire