From d03559080f8d17f8eb9ea72a5012fe55fdd77ba7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 2 Mar 2018 18:37:39 -0600 Subject: [PATCH] Theoretically fix migration issues for api_key table --- CHANGELOG.md | 1 + .../migrations/2018_01_13_142012_SetupTableForKeyEncryption.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3960ae599..fef00d908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Handle 404 errors from missing models in the application API bindings correctly. * Fix validation error returned when no environment variables are passed, even if there are no variables required. * Fix improper permissions on `PATCH /api/servers//startup` endpoint which was preventing enditing any start variables. +* Should fix migration issues from 0.6 when there are more than API key in the database. ### Changed * Changes order that validation of resource existence occurs in API requests to not try and use a non-existent model when validating data. diff --git a/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php b/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php index e7fd0c58c..5dba9c113 100644 --- a/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php +++ b/database/migrations/2018_01_13_142012_SetupTableForKeyEncryption.php @@ -16,7 +16,7 @@ class SetupTableForKeyEncryption extends Migration public function up() { Schema::table('api_keys', function (Blueprint $table) { - $table->char('identifier', 16)->unique()->after('user_id'); + $table->char('identifier', 16)->nullable()->unique()->after('user_id'); $table->dropUnique(['token']); });