-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1639 from AndyTWF/srd-import-transactions
fix: srd transaction imports
- Loading branch information
Showing
8 changed files
with
73 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
|
||
return [ | ||
'download_url' => env('SRD_DOWNLOAD_URL'), | ||
'import_enabled' => env('SRD_IMPORT_ENABLED', false), | ||
]; |
38 changes: 38 additions & 0 deletions
38
database/migrations/2024_09_08_145756_expand_srd_routes_primary_key.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
// Update the srd_routes table to drop the foreign key constraint on the srd_note_srd_route table | ||
Schema::table('srd_note_srd_route', function (Blueprint $table) { | ||
$table->dropForeign('srd_note_srd_route_srd_note_id_foreign'); | ||
}); | ||
|
||
// Update the srd_notes table to make the id column a bigIncrements rather than a smallIncrements | ||
Schema::table('srd_notes', function (Blueprint $table) { | ||
$table->bigIncrements('id')->first()->change(); | ||
}); | ||
|
||
// Now update the srd_note_srd_route table to make the srd_note_id column a bigInteger rather than an integer | ||
// and then re-add the foreign key constraint | ||
Schema::table('srd_note_srd_route', function (Blueprint $table) { | ||
$table->unsignedBigInteger('srd_note_id')->first()->change(); | ||
$table->foreign('srd_note_id')->references('id')->on('srd_notes')->onDelete('cascade'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
// | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters