bosnadev / database

An extended PostgreSQL driver for Laravel 5 with support for some aditional PostgreSQL data types: hstore, uuid, jsonb.
https://bosnadev.com
MIT License
78 stars 68 forks source link

Unsigned causes Postgres error when used with Integer or BigInteger #48

Closed faytekin closed 3 years ago

faytekin commented 3 years ago

Laravel Version: 8.48.1 PHP Version: 8.0.1

Migrations that mix integer() (or bigInteger()) with unsigned() no longer migrate, but throw an error with Postgres error.

Schema::create('broken_primary', function (Blueprint $table) {
    $table->integer('broken_id')->unsigned()->primary();
    $table->timestamps();
});
studnitz commented 3 years ago

This was fixed with https://github.com/laravel/framework/pull/37826, so no need for this anymore.