source: database/migrations/2019_05_03_000001_create_customer_columns.php

Last change on this file was dfae77e, checked in by Igor Danilovski <igor_danilovski@…>, 2 years ago
  • Initial commit;
  • Property mode set to 100644
File size: 954 bytes
RevLine 
[dfae77e]1<?php
2
3use Illuminate\Database\Migrations\Migration;
4use Illuminate\Database\Schema\Blueprint;
5use Illuminate\Support\Facades\Schema;
6
7class CreateCustomerColumns extends Migration
8{
9 /**
10 * Run the migrations.
11 *
12 * @return void
13 */
14 public function up()
15 {
16 Schema::table('users', function (Blueprint $table) {
17 $table->string('stripe_id')->nullable()->index();
18 $table->string('pm_type')->nullable();
19 $table->string('pm_last_four', 4)->nullable();
20 $table->timestamp('trial_ends_at')->nullable();
21 });
22 }
23
24 /**
25 * Reverse the migrations.
26 *
27 * @return void
28 */
29 public function down()
30 {
31 Schema::table('users', function (Blueprint $table) {
32 $table->dropColumn([
33 'stripe_id',
34 'pm_type',
35 'pm_last_four',
36 'trial_ends_at',
37 ]);
38 });
39 }
40}
Note: See TracBrowser for help on using the repository browser.