forked from art-institute-of-chicago/artic.edu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New migration to add email & opt-in fields. New validation rules for …
…these fields plus additional tour_json fields. Output new fields on proof of concept tour viewer page. Make unique gallery & artist counts available to the proof of concept tour viewer page
- Loading branch information
1 parent
c9d6b0f
commit 801d823
Showing
6 changed files
with
111 additions
and
17 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
32 changes: 32 additions & 0 deletions
32
...ations/2023_11_08_103349_add_creator_email_and_marketing_opt_in_to_custom_tours_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,32 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class () extends Migration { | ||
protected $connection; | ||
|
||
public function __construct() | ||
{ | ||
if (config('app.env') !== 'testing') { | ||
$this->connection = 'tours'; | ||
} | ||
} | ||
|
||
public function up(): void | ||
{ | ||
Schema::table('custom_tours', function (Blueprint $table) { | ||
$table->string('creator_email', 255)->default('default@example.com'); | ||
$table->boolean('marketing_opt_in')->default(false); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::table('custom_tours', function (Blueprint $table) { | ||
$table->dropColumn('creator_email'); | ||
$table->dropColumn('marketing_opt_in'); | ||
}); | ||
} | ||
}; |
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