| @@ 47-55 (lines=9) @@ | ||
| 44 | $connection = Config::get('ab::connection'); |
|
| 45 | ||
| 46 | // Create experiments table. |
|
| 47 | if (! Schema::connection($connection)->hasTable('experiments')) { |
|
| 48 | Schema::connection($connection)->create('experiments', function ($table) { |
|
| 49 | $table->increments('id'); |
|
| 50 | $table->string('name'); |
|
| 51 | $table->integer('visitors')->unsigned()->default(0); |
|
| 52 | $table->integer('engagement')->unsigned()->default(0); |
|
| 53 | $table->timestamps(); |
|
| 54 | }); |
|
| 55 | } |
|
| 56 | ||
| 57 | // Create goals table. |
|
| 58 | if (! Schema::connection($connection)->hasTable('goals')) { |
|
| @@ 58-66 (lines=9) @@ | ||
| 55 | } |
|
| 56 | ||
| 57 | // Create goals table. |
|
| 58 | if (! Schema::connection($connection)->hasTable('goals')) { |
|
| 59 | Schema::connection($connection)->create('goals', function ($table) { |
|
| 60 | $table->increments('id'); |
|
| 61 | $table->string('name'); |
|
| 62 | $table->string('experiment'); |
|
| 63 | $table->integer('count')->unsigned()->default(0); |
|
| 64 | $table->timestamps(); |
|
| 65 | }); |
|
| 66 | } |
|
| 67 | ||
| 68 | $this->info('Database schema initialized.'); |
|
| 69 | ||