You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: database/migrations/2020_05_20_100000_create_contacts_table.php
+3-12
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ public function up()
12
12
{
13
13
Schema::create('contacts', function (Blueprint$table) {
14
14
$table->id();
15
-
$table->string('form_type')->index();// String title of the form type so know which one was completed
15
+
$table->string('form_type')->index();
16
16
$table->string('reference_number')->index()->unique(); // Generated by system. This is identifier used to communicate with customer about their contact form. Reference number is emailed to them.
17
17
$table->foreignIdFor(app('location'))->index();
18
18
$table->string('email');
@@ -22,17 +22,8 @@ public function up()
22
22
$table->string('company_name')->nullable();
23
23
$table->string('phone')->nullable(); // Will need to format before saving
24
24
$table->text('message')->nullable();
25
-
$table->json('additional_fields')->nullable();
26
-
27
-
// Move application specific data to additonal_fields
28
-
$table->smallInteger('participants')->nullable();
29
-
$table->date('requested_date')->nullable();
30
-
$table->time('requested_time')->nullable(); // Stored in location timezone
31
-
32
-
// Move response fields to different table (contact followup or something like that)
33
-
$table->dateTime('emailed_at')->nullable();
34
-
$table->dateTime('closed_at')->nullable();
35
-
25
+
$table->json('fields')->nullable();
26
+
36
27
$table->softDeletes(); // Soft delete if email bounces or if the contact submission is spam.
class CreateContactResponsesTable extends Migration
11
+
{
12
+
publicfunctionup()
13
+
{
14
+
Schema::create('contact_responses', function (Blueprint$table) {
15
+
$table->id();
16
+
$table->foreignIdFor(Contact::class);
17
+
$table->text('message')->nullable(); // Message will be communication to or from contact user
18
+
$table->text('comment')->nullable(); // Comment is internal communication. This is more like documentation so it is different than a note attachment from tipoff/notes
0 commit comments