g/g
1
0
mirror of https://git-old.hatthieves.es/g/g.git synced 2026-06-27 03:45:58 +00:00
Files
g/Wolf/database/migrations/PersonalsMigration.php
T
Gustavo Adolfo Mesa Roldán b0ff1d5d45 first commit
2019-07-06 08:20:18 +02:00

33 lines
809 B
PHP

<?php
use Illuminate\Database\Capsule\Manager as Capsule;
/**
* Personals Migrate
*/
class PersonalsMigration {
function run()
{
Capsule::schema()->dropIfExists('personals');
Capsule::schema()->create('personals', function($table) {
$table->increments('id');
$table->integer('candidate_id')->unique()->unsigned();
$table->string('title');
$table->string('name');
$table->string('surname');
$table->date('dateBirth');
$table->integer('phoneNumber');
$table->string('address');
$table->string('postalCode');
$table->string('city');
$table->string('country');
$table->text('summary');
$table->string('linkedin');
$table->timestamps();
$table->foreign('candidate_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
});
}
}