PostgreSQL Support (#4486)
Co-authored-by: Matthew Penner <matthew@pterodactyl.io>
This commit is contained in:
parent
21613fa602
commit
3bf5a71802
223 changed files with 912 additions and 1052 deletions
|
@ -9,22 +9,15 @@ class UpdateColumnNames extends Migration
|
|||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up()
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->dropForeign('servers_node_foreign');
|
||||
$table->dropForeign('servers_owner_foreign');
|
||||
$table->dropForeign('servers_allocation_foreign');
|
||||
$table->dropForeign('servers_service_foreign');
|
||||
$table->dropForeign('servers_option_foreign');
|
||||
$table->dropForeign('servers_pack_foreign');
|
||||
|
||||
$table->dropIndex('servers_node_foreign');
|
||||
$table->dropIndex('servers_owner_foreign');
|
||||
$table->dropIndex('servers_allocation_foreign');
|
||||
$table->dropIndex('servers_service_foreign');
|
||||
$table->dropIndex('servers_option_foreign');
|
||||
$table->dropIndex('servers_pack_foreign');
|
||||
$table->dropForeign(['node']);
|
||||
$table->dropForeign(['owner']);
|
||||
$table->dropForeign(['allocation']);
|
||||
$table->dropForeign(['service']);
|
||||
$table->dropForeign(['option']);
|
||||
$table->dropForeign(['pack']);
|
||||
|
||||
$table->renameColumn('node', 'node_id');
|
||||
$table->renameColumn('owner', 'owner_id');
|
||||
|
@ -47,14 +40,10 @@ class UpdateColumnNames extends Migration
|
|||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->dropForeign(['node_id']);
|
||||
$table->dropForeign(['owner_id']);
|
||||
$table->dropForeign(['allocation_id']);
|
||||
$table->dropForeign(['service_id']);
|
||||
$table->dropForeign(['option_id']);
|
||||
$table->dropForeign(['node_id', 'owner_id', 'allocation_id', 'service_id', 'option_id']);
|
||||
|
||||
$table->renameColumn('node_id', 'node');
|
||||
$table->renameColumn('owner_id', 'owner');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue