| 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 CreateGroupsTable extends Migration |
| 8: | { |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | public function up() |
| 15: | { |
| 16: | Capsule::schema()->create('contacts_groups', function (Blueprint $table) { |
| 17: | $table->increments('Id'); |
| 18: | $table->string('UUID')->default(''); |
| 19: | $table->integer('IdUser')->default(0); |
| 20: | $table->string('Name')->default(''); |
| 21: | $table->boolean('IsOrganization')->default(false); |
| 22: | $table->string('Email')->default(''); |
| 23: | $table->string('Company')->default(''); |
| 24: | $table->string('Street')->default(''); |
| 25: | $table->string('City')->default(''); |
| 26: | $table->string('State')->default(''); |
| 27: | $table->string('Zip')->default(''); |
| 28: | $table->string('Country')->default(''); |
| 29: | $table->string('Phone')->default(''); |
| 30: | $table->string('Fax')->default(''); |
| 31: | $table->string('Web')->default(''); |
| 32: | $table->string('Events')->default(''); |
| 33: | $table->json('Properties')->nullable(); |
| 34: | $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable(); |
| 35: | $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable(); |
| 36: | }); |
| 37: | } |
| 38: | |
| 39: | |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | public function down() |
| 45: | { |
| 46: | Capsule::schema()->dropIfExists('contacts_groups'); |
| 47: | } |
| 48: | } |
| 49: | |