-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make fk definition compatible with SQLite
- Loading branch information
Kurt Friars
committed
Oct 7, 2024
1 parent
2e12f2a
commit 2485e89
Showing
5 changed files
with
30 additions
and
86 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
tests/Database/Migrations/schema/fks/create_signatures_table.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,26 @@ | ||
<?php | ||
|
||
use Plank\Snapshots\Migrator\SnapshotBlueprint; | ||
use Plank\Snapshots\Migrator\SnapshotMigration; | ||
|
||
return new class extends SnapshotMigration | ||
{ | ||
public function up() | ||
{ | ||
$this->schema->create('signatures', function (SnapshotBlueprint $table) { | ||
$table->id(); | ||
$table->unsignedBigInteger('document_id'); | ||
$table->string('svg'); | ||
$table->timestamps(); | ||
|
||
$table->foreign('document_id') | ||
->references('id') | ||
->onSnapshot('documents'); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
$this->schema->drop('signatures'); | ||
} | ||
}; |
22 changes: 0 additions & 22 deletions
22
tests/Database/Migrations/schema/fks/y_add_folders_table.php
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
tests/Database/Migrations/schema/fks/z_alter_documents_table.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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