From 2cb54c6cb99d11b475274bcc0198244ed6b65a0d Mon Sep 17 00:00:00 2001 From: Mohammed Abdulkereem Date: Wed, 15 May 2019 23:27:08 +0300 Subject: [PATCH] Fixed the bug of unregistered types --- composer.json | 2 +- src/templates/MigrationFileTemplate.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3f0b8e7..e80b03a 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "generate-migrations-hook", "description": "This hook is to generate voyager-only migration for laravel app", - "version": "v0.1.1beta", + "version": "v0.1.2beta", "license": "MIT", "homepage": "https://github.com/mohammed-io/generate-migrations-hook", "authors": [ diff --git a/src/templates/MigrationFileTemplate.php b/src/templates/MigrationFileTemplate.php index 06641dd..ff71598 100644 --- a/src/templates/MigrationFileTemplate.php +++ b/src/templates/MigrationFileTemplate.php @@ -17,9 +17,15 @@ public function generate(array $config) use Illuminate\Database\Migrations\Migration; use TCG\Voyager\Database\DatabaseUpdater; use TCG\Voyager\Database\Schema\SchemaManager; +use TCG\Voyager\Database\Types\Type; class $className extends Migration { + public function __construct() + { + Type::registerCustomPlatformTypes(); + } + /** * Run the migrations. *