From cbeb6dfcb7d89abd38fe597ca3c870e8c876a373 Mon Sep 17 00:00:00 2001 From: Aleksandr Riabov Date: Thu, 16 Sep 2021 22:42:04 +0300 Subject: [PATCH] Added SchemaBuilderTrait --- Migration.php | 1 + SchemaBuilderTrait.php | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 SchemaBuilderTrait.php diff --git a/Migration.php b/Migration.php index 72ea8ba..7a86e3c 100644 --- a/Migration.php +++ b/Migration.php @@ -14,6 +14,7 @@ */ class Migration extends \yii\db\Migration { + use SchemaBuilderTrait; public $db = 'clickhouse'; diff --git a/SchemaBuilderTrait.php b/SchemaBuilderTrait.php new file mode 100644 index 0000000..333a802 --- /dev/null +++ b/SchemaBuilderTrait.php @@ -0,0 +1,25 @@ +getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_UUID); + } +}