-
Notifications
You must be signed in to change notification settings - Fork 7
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
Exception on digital oceans managed database #8
Comments
Thanks for the report. I'll sort this out tomorrow! What version of mysql/Postgres is that? |
MySQL 8.0.27. They have So I guess this would work:
Instead of defining the primary key at the end |
I remember having issues with your recommended solution, that's why I went with this one. Which is not good either. I'm out already, but I'll fix it tomorrow, I hope it doesn't break things too much on your end. |
Did the |
As far as I see (from discussions around the topic), a possible solution would be to disable the primary key constraint on the database only for the session that's running the migrations: DB::statement('SET SESSION sql_require_primary_key=0'); Do you think this would this work in your case? |
What about to keep it plain simple and introduce an id key, and rename this column to For me personally this is not a big problem, since I can change the public function up()
{
if (!Schema::hasTable('languages')) {
Schema::create('languages', function (Blueprint $table) {
$table->increments('id');
$table->char('code', 2)->unique();
$table->string('name');
$table->string('native_name');
$table->timestamps();
});
}
} |
It would break the library and especially its consumers. Please bear in mind that this is a library that is being used by many other libraries and applications. We cannot do arbitrary breaking changes. |
In this case, I think it's best to keep it as it is now. Thank you for your support! |
Thanks for your understanding. I keep thinking about an alternative solution though. |
When running this migration with a digital ocean managed database, I get this error:
The text was updated successfully, but these errors were encountered: