Update migration back in time

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-04-05 20:31:17 +01:00
parent c12ef19fcc
commit 3dd7c00a0b
2 changed files with 9 additions and 3 deletions

View file

@ -14,13 +14,14 @@ class CreateCustomFieldCustomFieldset extends Migration {
{
Schema::create('custom_field_custom_fieldset', function(Blueprint $table)
{
$table->bigIncrements('id')->first();
$table->integer('custom_field_id');
$table->integer('custom_fieldset_id');
$table->integer('order');
$table->boolean('required');
$table->engine = 'InnoDB';
$table->engine = 'InnoDB';
});
}
/**

View file

@ -13,9 +13,14 @@ class AddPrimaryKeyToCustomFieldsPivot extends Migration
*/
public function up()
{
// Check if the ID primary key already exists, if not, add it
Schema::table('custom_field_custom_fieldset', function (Blueprint $table) {
$table->bigIncrements('id')->first();
if (!Schema::hasColumn('custom_field_custom_fieldset', 'id')) {
$table->bigIncrements('id')->first();
}
});
}
/**