PostgreSQL Support (#4486)

Co-authored-by: Matthew Penner <matthew@pterodactyl.io>
This commit is contained in:
Lance Pioch 2022-11-25 15:29:04 -05:00 committed by GitHub
parent 21613fa602
commit 3bf5a71802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
223 changed files with 912 additions and 1052 deletions

View file

@ -9,13 +9,11 @@ class RenameColumns extends Migration
/**
* Run the migrations.
*/
public function up()
public function up(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->dropForeign('allocations_node_foreign');
$table->dropForeign('allocations_assigned_to_foreign');
$table->dropIndex('allocations_node_foreign');
$table->dropIndex('allocations_assigned_to_foreign');
$table->dropForeign(['node']);
$table->dropForeign(['assigned_to']);
$table->renameColumn('node', 'node_id');
$table->renameColumn('assigned_to', 'server_id');
@ -27,13 +25,13 @@ class RenameColumns extends Migration
/**
* Reverse the migrations.
*/
public function down()
public function down(): void
{
Schema::table('allocations', function (Blueprint $table) {
$table->dropForeign('allocations_node_id_foreign');
$table->dropForeign('allocations_server_id_foreign');
$table->dropIndex('allocations_node_id_foreign');
$table->dropIndex('allocations_server_id_foreign');
$table->dropForeign(['node_id']);
$table->dropForeign(['server_id']);
$table->dropIndex(['node_id']);
$table->dropIndex(['server_id']);
$table->renameColumn('node_id', 'node');
$table->renameColumn('server_id', 'assigned_to');