| 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 CreateContactsTable extends Migration |
| 8: | { |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | public function up() |
| 15: | { |
| 16: | Capsule::schema()->create('contacts', function (Blueprint $table) { |
| 17: | $table->increments('Id'); |
| 18: | $table->string('UUID')->default(''); |
| 19: | $table->integer('IdUser')->default(0); |
| 20: | $table->integer('IdTenant')->default(0); |
| 21: | $table->string('Storage')->default(''); |
| 22: | $table->string('FullName')->default(''); |
| 23: | $table->boolean('UseFriendlyName')->default(true); |
| 24: | $table->integer('PrimaryEmail')->default(\Aurora\Modules\Contacts\Enums\PrimaryEmail::Personal); |
| 25: | $table->integer('PrimaryPhone')->default(\Aurora\Modules\Contacts\Enums\PrimaryPhone::Personal); |
| 26: | $table->integer('PrimaryAddress')->default(\Aurora\Modules\Contacts\Enums\PrimaryAddress::Personal); |
| 27: | $table->string('ViewEmail')->default(''); |
| 28: | $table->string('Title')->default(''); |
| 29: | $table->string('FirstName')->default(''); |
| 30: | $table->string('LastName')->default(''); |
| 31: | $table->string('NickName')->default(''); |
| 32: | $table->string('Skype')->default(''); |
| 33: | $table->string('Facebook')->default(''); |
| 34: | $table->string('PersonalEmail')->default(''); |
| 35: | $table->string('PersonalAddress')->default(''); |
| 36: | $table->string('PersonalCity')->default(''); |
| 37: | $table->string('PersonalState')->default(''); |
| 38: | $table->string('PersonalZip')->default(''); |
| 39: | $table->string('PersonalCountry')->default(''); |
| 40: | $table->string('PersonalWeb')->default(''); |
| 41: | $table->string('PersonalFax')->default(''); |
| 42: | $table->string('PersonalPhone')->default(''); |
| 43: | $table->string('PersonalMobile')->default(''); |
| 44: | $table->string('BusinessEmail')->default(''); |
| 45: | $table->string('BusinessCompany')->default(''); |
| 46: | $table->string('BusinessAddress')->default(''); |
| 47: | $table->string('BusinessCity')->default(''); |
| 48: | $table->string('BusinessState')->default(''); |
| 49: | $table->string('BusinessZip')->default(''); |
| 50: | $table->string('BusinessCountry')->default(''); |
| 51: | $table->string('BusinessJobTitle')->default(''); |
| 52: | $table->string('BusinessDepartment')->default(''); |
| 53: | $table->string('BusinessOffice')->default(''); |
| 54: | $table->string('BusinessPhone')->default(''); |
| 55: | $table->string('BusinessFax')->default(''); |
| 56: | $table->string('BusinessWeb')->default(''); |
| 57: | $table->string('OtherEmail')->default(''); |
| 58: | $table->text('Notes')->nullable(); |
| 59: | $table->integer('BirthDay')->default(0); |
| 60: | $table->integer('BirthMonth')->default(0); |
| 61: | $table->integer('BirthYear')->default(0); |
| 62: | $table->string('ETag')->default(''); |
| 63: | $table->boolean('Auto')->default(false); |
| 64: | $table->integer('Frequency')->default(0); |
| 65: | $table->dateTime('DateModified')->nullable(); |
| 66: | |
| 67: | $table->json('Properties')->nullable(); |
| 68: | |
| 69: | $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable(); |
| 70: | $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable(); |
| 71: | }); |
| 72: | } |
| 73: | |
| 74: | |
| 75: | |
| 76: | |
| 77: | |
| 78: | |
| 79: | public function down() |
| 80: | { |
| 81: | Capsule::schema()->dropIfExists('contacts'); |
| 82: | } |
| 83: | } |
| 84: | |