database/migrations/2020_11_16_00001_create_tickets_table.php 1 location
|
@@ 25-30 (lines=6) @@
|
| 22 |
|
$table->enum('state', [ 'OPEN', 'ANSWERED', 'CLOSED' ])->default('OPEN'); |
| 23 |
|
$table->timestamps(); |
| 24 |
|
|
| 25 |
|
if (! config('laravel-tickets.models.uuid')) { |
| 26 |
|
$table->foreign('user_id') |
| 27 |
|
->on(config('laravel-tickets.database.users-table'))->references('id'); |
| 28 |
|
$table->foreign('category_id') |
| 29 |
|
->on(config('laravel-tickets.database.ticket-categories-table'))->references('id'); |
| 30 |
|
} |
| 31 |
|
}); |
| 32 |
|
} |
| 33 |
|
|
database/migrations/2020_11_16_00002_create_ticket_messages_table.php 1 location
|
@@ 23-28 (lines=6) @@
|
| 20 |
|
$table->text('message'); |
| 21 |
|
$table->timestamps(); |
| 22 |
|
|
| 23 |
|
if (! config('laravel-tickets.models.uuid')) { |
| 24 |
|
$table->foreign('user_id') |
| 25 |
|
->on(config('laravel-tickets.database.users-table'))->references('id'); |
| 26 |
|
$table->foreign('ticket_id') |
| 27 |
|
->on(config('laravel-tickets.database.tickets-table'))->references('id'); |
| 28 |
|
} |
| 29 |
|
}); |
| 30 |
|
} |
| 31 |
|
|