Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CrastyCrap's avatar

Digital ocean: Unable to create or change a table without primary key

I am deploying laravel-vue project on digital ocean but when i migrate it i got this error

''' Digital ocean: Unable to create or change a table without primary key ''' how can i solve it?

0 likes
3 replies
Sinnbeck's avatar

Can you give us something to go by? Like the migrations for the table. If it was just a matter of googling that error, I assume you would have done so yourself.

tykus's avatar

In the up method; before the Schema::create statement:

DB::statement("set sql_require_primary_key = off");

Please or to participate in this conversation.