Migrations
- Pharmacologic and medecine pivot Schema::create('pharmaco_medecine', function(Blueprint $table) {
$table->increments('id');
$table->integer('medecine _id')->unsigned(); $table->foreign('medecine _id') ->references('id')->on('tbl_medecine') ->onDelete('cascade');
$table->integer('pharmaco_id')->unsigned(); $table->foreign('pharmaco_id') ->references('id')->on('tbl_pharmaco') ->onDelete('cascade'); });
- Therapeutic and medecine pivot
Schema::create('therapeutic_medecine', function(Blueprint $table) {
$table->increments('id');
$table->integer('medecine_id')->unsigned();
$table->foreign('medecine_id')
->references('id')->on('tbl_medecine')
->onDelete('cascade');
$table->integer('therapeutic_id')->unsigned();
$table->foreign('therapeutic_id')
->references('id')->on('tbl_therapeutic')
->onDelete('cascade');
});
- Galenic and medecine pivot
Schema::create('gal_medecine, function(Blueprint $table) {
$table->increments('id');
$table->integer('medecine_id')->unsigned();
$table->foreign('medecine_id')
->references('id')->on('tbl_medecine')
->onDelete('cascade');
$table->integer('gal_id')->unsigned();
$table->foreign('gal_id')
->references('id')->on('tbl_gal')
->onDelete('cascade');
});
- AdministrationMode and medecine pivot
Schema::create('medecine_admin_mode', function(Blueprint $table) {
$table->increments('id');
$table->integer('medecine_id')->unsigned();
$table->foreign('medecine_id')
->references('id')->on('tbl_medecine')
->onDelete('cascade');
$table->integer('admin_mode_id')->unsigned();
$table->foreign('admin_mode_id')
->references('id')->on('tbl_adminmode')
->onDelete('cascade');
});
- ActivePrinciple and medecine pivot
Schema::create('medecine_active_princip', function(Blueprint $table) {
$table->increments('id');
$table->integer('medecine_id')->unsigned();
$table->foreign('medecine_id')
->references('id')->on('tbl_medecine')
->onDelete('cascade');
$table->integer('active_princip_id')->unsigned();
$table->foreign('active_princip_id')
->references('id')->on('tbl_activeprincip')
->onDelete('cascade');
});