Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
Update tou_version and tou_acceptances migration#1028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
6a3589fe0f554ca630e3a3754c00e10387628de5d561a7904File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -10,7 +10,6 @@ | ||
| */ | ||
| public function up(): void { | ||
| Schema::create('tou_versions', function (Blueprint $table) { | ||
| $table->id(); | ||
| $table->string('version')->unique(); | ||
| ||
| $table->boolean('active')->default(false); | ||
| $table->timestamps(); | ||
dati18 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,11 +12,16 @@ public function up(): void { | ||
| Schema::create('tou_acceptances', function (Blueprint $table) { | ||
| $table->id(); | ||
| $table->unsignedInteger('user_id'); | ||
| $table->string('tou_version', 10); | ||
| $table->string('tou_version'); | ||
| ||
| $table->timestamp('tou_accepted_at'); | ||
| $table->timestamps(); | ||
| $table->unique(['user_id', 'tou_version']); | ||
| $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete(); | ||
| $table->foreign('tou_version') | ||
| ->references('version') | ||
| ->on('tou_versions') | ||
| ->cascadeOnUpdate() | ||
| ->restrictOnDelete(); | ||
| }); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.