You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
809 B

4 years ago
  1. <?php
  2. use Illuminate\Database\Capsule\Manager as Capsule;
  3. /**
  4. * Personals Migrate
  5. */
  6. class PersonalsMigration {
  7. function run()
  8. {
  9. Capsule::schema()->dropIfExists('personals');
  10. Capsule::schema()->create('personals', function($table) {
  11. $table->increments('id');
  12. $table->integer('candidate_id')->unique()->unsigned();
  13. $table->string('title');
  14. $table->string('name');
  15. $table->string('surname');
  16. $table->date('dateBirth');
  17. $table->integer('phoneNumber');
  18. $table->string('address');
  19. $table->string('postalCode');
  20. $table->string('city');
  21. $table->string('country');
  22. $table->text('summary');
  23. $table->string('linkedin');
  24. $table->timestamps();
  25. $table->foreign('candidate_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
  26. });
  27. }
  28. }