Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ public function up(): void
});

// Add spatial columns
DB::statement("ALTER TABLE $this->tableName ADD COLUMN center POINT NULL after is_capital");
DB::statement("ALTER TABLE $this->tableName ADD COLUMN area MULTIPOLYGON NULL after center");
if (DB::connection()->getDriverName() === 'pgsql') {
DB::statement("ALTER TABLE $this->tableName ADD COLUMN center TEXT NULL");
DB::statement("ALTER TABLE $this->tableName ADD COLUMN area TEXT NULL");
} else {
DB::statement("ALTER TABLE $this->tableName ADD COLUMN center POINT NULL after is_capital");
DB::statement("ALTER TABLE $this->tableName ADD COLUMN area MULTIPOLYGON NULL after center");
}
}

public function down(): void
Expand Down