1: | <?php |
2: | |
3: | use Illuminate\Database\Migrations\Migration; |
4: | use Illuminate\Database\Schema\Blueprint; |
5: | use Illuminate\Database\Capsule\Manager as Capsule; |
6: | |
7: | class CreateMailScheduledMessagesTable extends Migration |
8: | { |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | public function up() |
15: | { |
16: | if (!Capsule::schema()->hasTable('mail_scheduled_messages')) { |
17: | Capsule::schema()->create('mail_scheduled_messages', function (Blueprint $table) { |
18: | $table->id('id'); |
19: | $table->bigInteger('account_id'); |
20: | $table->text('folder_full_name'); |
21: | $table->string('message_uid'); |
22: | $table->integer('schedule_timestamp'); |
23: | $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable(); |
24: | $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable(); |
25: | }); |
26: | } |
27: | } |
28: | |
29: | |
30: | |
31: | |
32: | |
33: | |
34: | public function down() |
35: | { |
36: | Capsule::schema()->dropIfExists('mail_scheduled_messages'); |
37: | } |
38: | } |
39: | |