Refactoring Complet
Voir facebook pour l'installation de la nouvelle BDD.
This commit is contained in:
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateReferentsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('referents', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('email');
|
||||
$table->string('motdepasse');
|
||||
$table->string('nom');
|
||||
$table->string('prenom');
|
||||
$table->string('etablissement');
|
||||
$table->string('image');
|
||||
$table->string('remember_token',100)->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('password_resets', function(Blueprint $table)
|
||||
{
|
||||
$table->string('email');
|
||||
$table->string('token');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('referents');
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateConfigJeusTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('config_jeus', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('nom');
|
||||
$table->string('parametres');
|
||||
$table->string('referent_id');
|
||||
$table->string('actifMemo');
|
||||
$table->string('actifPuzzle');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('config_jeu_oeuvre', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('config_jeu_id');
|
||||
$table->integer('oeuvre_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('config_jeu_oeuvre');
|
||||
Schema::drop('config_jeus');
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateOeuvresTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('oeuvres', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('designation');
|
||||
$table->integer('technique_id');
|
||||
$table->integer('domaine_id');
|
||||
$table->integer('matiere_id');
|
||||
$table->integer('auteur_id');
|
||||
$table->string('image');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('oeuvres');
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration {
|
||||
class CreateTechniquesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
@ -12,14 +12,10 @@ class CreateUsersTable extends Migration {
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function(Blueprint $table)
|
||||
Schema::create('techniques', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('password', 60);
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->string('nom');
|
||||
});
|
||||
}
|
||||
|
||||
@ -30,7 +26,7 @@ class CreateUsersTable extends Migration {
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
Schema::drop('techniques');
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration {
|
||||
class CreateDomainesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
@ -12,11 +12,10 @@ class CreatePasswordResetsTable extends Migration {
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function(Blueprint $table)
|
||||
Schema::create('domaines', function(Blueprint $table)
|
||||
{
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
$table->timestamp('created_at');
|
||||
$table->increments('id');
|
||||
$table->string('nom');
|
||||
});
|
||||
}
|
||||
|
||||
@ -27,7 +26,7 @@ class CreatePasswordResetsTable extends Migration {
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
Schema::drop('domaines');
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateMatieresTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('matieres', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('nom');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('matieres');
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAuteursTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('auteurs', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('nom');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('auteurs');
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateDatationsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('datations', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('dateDebut');
|
||||
$table->string('dateFin');
|
||||
$table->integer('oeuvre_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('datations');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user