Commit 4f524dc6 authored by Antoine Le Gonidec's avatar Antoine Le Gonidec

New database table to store archives/dependencies relationships

parent 963f8ad2
...@@ -13,8 +13,10 @@ class CreateDependenciesTable extends Migration { ...@@ -13,8 +13,10 @@ class CreateDependenciesTable extends Migration {
public function up() { public function up() {
Schema::create('dependencies', function (Blueprint $table) { Schema::create('dependencies', function (Blueprint $table) {
$table->string('system'); $table->string('system');
$table->string('name')
->nullable();
$table->string('package'); $table->string('package');
$table->unique([ 'system', 'package' ]); $table->unique([ 'system', 'name', 'package' ]);
$table->boolean('base') $table->boolean('base')
->default(false); ->default(false);
}); });
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRelationshipBetweenArchivesAndDependencies extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('archive_dependency', function (Blueprint $table) {
$table->string('archive_type');
$table->string('dependency_name');
$table->unique([ 'archive_type', 'dependency_name' ]);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('archive_dependency');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment