From c855f3c8cdecd287378b52d6c9bc3af10a10bea5 Mon Sep 17 00:00:00 2001 From: Egorka Date: Wed, 5 Sep 2018 09:08:38 +0300 Subject: [PATCH] Fix modules manifest permissions --- common/modules/banners/manifest.php | 18 +++---- .../m180821_084231_create_banners_table.php | 30 +++++------ .../m180821_100724_create_banners_places_table.php | 12 ++--- .../m180821_100959_add_banners_place_id_field.php | 6 +-- common/modules/blog/manifest.php | 18 +++---- ...m180605_184534_create_blog_categories_table.php | 36 +++++++------- .../m180605_190347_create_blog_posts_table.php | 58 +++++++++++----------- .../m180605_193423_create_blog_tags_table.php | 30 +++++------ ...05_193748_create_blog_tag_assignments_table.php | 42 ++++++++-------- .../m180605_194207_create_blog_comments_table.php | 58 +++++++++++----------- .../m180725_091725_add_blog_posts_type_field.php | 14 +++--- ..._113503_remove_blog_posts_slug_unique_index.php | 8 +-- .../m180827_195932_set_blog_unicode_collate.php | 14 +++--- .../m180828_190314_create_blog_post_lng_table.php | 46 ++++++++--------- ...830_163050_create_blog_categories_lng_table.php | 42 ++++++++-------- common/modules/forms/manifest.php | 16 +++--- common/modules/languages/manifest.php | 18 +++---- common/modules/links/manifest.php | 10 ++-- common/modules/pages/manifest.php | 18 +++---- 19 files changed, 242 insertions(+), 252 deletions(-) diff --git a/common/modules/banners/manifest.php b/common/modules/banners/manifest.php index 6f145b6..b274cb0 100644 --- a/common/modules/banners/manifest.php +++ b/common/modules/banners/manifest.php @@ -1,13 +1,11 @@ '1.0.1', - 'name' => 'banners', - 'description' => 'Banners management and rotation system for site', - 'module' => 'BannersModule', - 'permissions' => [ - 'BannersManagement' => [ - 'description' => 'Manage banners system' - ], - ], -]; \ No newline at end of file + 'version' => '1.0.1', + 'name' => 'banners', + 'description' => 'Banners management and rotation system for site', + 'module' => 'BannersModule', + 'permissions' => [ + 'BannersManagement' => 'Manage banners system', + ], +]; diff --git a/common/modules/banners/migrations/m180821_084231_create_banners_table.php b/common/modules/banners/migrations/m180821_084231_create_banners_table.php index cec4388..8bf947d 100644 --- a/common/modules/banners/migrations/m180821_084231_create_banners_table.php +++ b/common/modules/banners/migrations/m180821_084231_create_banners_table.php @@ -12,23 +12,23 @@ class m180821_084231_create_banners_table extends Migration */ public function safeUp() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%banners}}', [ - 'id' => $this->primaryKey(), - 'title' => $this->string(255)->notNull(), - 'image' => $this->string(255)->notNull(), - 'url' => $this->string(255), - 'target' => $this->string(15)->defaultValue('_blank'), - 'active' => $this->integer(1)->defaultValue(1), - 'start_at' => $this->integer()->unsigned(), - 'end_at' => $this->integer()->unsigned(), - 'created_at' => $this->integer()->unsigned(), - 'updated_at' => $this->integer()->unsigned(), - 'include_urls' => 'LONGTEXT', - 'exclude_urls' => 'LONGTEXT', - 'views' => $this->integer()->unsigned()->defaultValue(0), - 'clicks' => $this->integer()->unsigned()->defaultValue(0), + 'id' => $this->primaryKey(), + 'title' => $this->string(255)->notNull(), + 'image' => $this->string(255)->notNull(), + 'url' => $this->string(255), + 'target' => $this->string(15)->defaultValue('_blank'), + 'active' => $this->integer(1)->defaultValue(1), + 'start_at' => $this->integer()->unsigned(), + 'end_at' => $this->integer()->unsigned(), + 'created_at' => $this->integer()->unsigned(), + 'updated_at' => $this->integer()->unsigned(), + 'include_urls' => 'LONGTEXT', + 'exclude_urls' => 'LONGTEXT', + 'views' => $this->integer()->unsigned()->defaultValue(0), + 'clicks' => $this->integer()->unsigned()->defaultValue(0), ], $tableOptions); } diff --git a/common/modules/banners/migrations/m180821_100724_create_banners_places_table.php b/common/modules/banners/migrations/m180821_100724_create_banners_places_table.php index be50d72..aff0e3c 100644 --- a/common/modules/banners/migrations/m180821_100724_create_banners_places_table.php +++ b/common/modules/banners/migrations/m180821_100724_create_banners_places_table.php @@ -12,14 +12,14 @@ class m180821_100724_create_banners_places_table extends Migration */ public function safeUp() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%banners_places}}', [ - 'id' => $this->primaryKey(), - 'title' => $this->string(255)->notNull(), - 'width' => $this->integer(), - 'height' => $this->integer(), - 'active' => $this->integer(1)->defaultValue(1) + 'id' => $this->primaryKey(), + 'title' => $this->string(255)->notNull(), + 'width' => $this->integer(), + 'height' => $this->integer(), + 'active' => $this->integer(1)->defaultValue(1) ], $tableOptions); } diff --git a/common/modules/banners/migrations/m180821_100959_add_banners_place_id_field.php b/common/modules/banners/migrations/m180821_100959_add_banners_place_id_field.php index a1c8ebd..9d75a40 100644 --- a/common/modules/banners/migrations/m180821_100959_add_banners_place_id_field.php +++ b/common/modules/banners/migrations/m180821_100959_add_banners_place_id_field.php @@ -12,10 +12,10 @@ class m180821_100959_add_banners_place_id_field extends Migration */ public function safeUp() { - $this->addColumn('{{%banners}}', 'place_id', $this->integer()); + $this->addColumn('{{%banners}}', 'place_id', $this->integer()); - $this->createIndex('idx_banners_place_id', '{{%banners}}', 'place_id'); - $this->addForeignKey('frg_banners_place_id_banners_places_id', '{{%banners}}', 'place_id', 'banners_places', 'id', 'CASCADE'); + $this->createIndex('idx_banners_place_id', '{{%banners}}', 'place_id'); + $this->addForeignKey('frg_banners_place_id_banners_places_id', '{{%banners}}', 'place_id', 'banners_places', 'id', 'CASCADE'); } /** diff --git a/common/modules/blog/manifest.php b/common/modules/blog/manifest.php index 5505144..dbb0617 100644 --- a/common/modules/blog/manifest.php +++ b/common/modules/blog/manifest.php @@ -1,13 +1,11 @@ '1.0.1', - 'name' => 'blog', - 'description' => 'Blog system for site with comments and slug', - 'module' => 'BlogModule', - 'permissions' => [ - 'BlogManagement' => [ - 'description' => 'Blog management system' - ], - ], -]; \ No newline at end of file + 'version' => '1.0.1', + 'name' => 'blog', + 'description' => 'Blog system for site with comments and slug', + 'module' => 'BlogModule', + 'permissions' => [ + 'BlogManagement' => 'Blog management system' + ], +]; diff --git a/common/modules/blog/migrations/m180605_184534_create_blog_categories_table.php b/common/modules/blog/migrations/m180605_184534_create_blog_categories_table.php index 74cfcc2..e64ec5e 100644 --- a/common/modules/blog/migrations/m180605_184534_create_blog_categories_table.php +++ b/common/modules/blog/migrations/m180605_184534_create_blog_categories_table.php @@ -7,25 +7,25 @@ use yii\db\Migration; */ class m180605_184534_create_blog_categories_table extends Migration { - public function up() - { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + public function up() + { + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; - $this->createTable('{{%blog_categories}}', [ - 'id' => $this->primaryKey(), - 'name' => $this->string()->notNull(), - 'slug' => $this->string()->notNull(), - 'title' => $this->string(), - 'description' => $this->text(), - 'sort' => $this->integer()->notNull(), - 'meta_json' => 'LONGTEXT NOT NULL', - ], $tableOptions); + $this->createTable('{{%blog_categories}}', [ + 'id' => $this->primaryKey(), + 'name' => $this->string()->notNull(), + 'slug' => $this->string()->notNull(), + 'title' => $this->string(), + 'description' => $this->text(), + 'sort' => $this->integer()->notNull(), + 'meta_json' => 'LONGTEXT NOT NULL', + ], $tableOptions); - $this->createIndex('{{%idx-blog_categories-slug}}', '{{%blog_categories}}', 'slug', true); - } + $this->createIndex('{{%idx-blog_categories-slug}}', '{{%blog_categories}}', 'slug', true); + } - public function down() - { - $this->dropTable('{{%blog_categories}}'); - } + public function down() + { + $this->dropTable('{{%blog_categories}}'); + } } diff --git a/common/modules/blog/migrations/m180605_190347_create_blog_posts_table.php b/common/modules/blog/migrations/m180605_190347_create_blog_posts_table.php index 8e79265..fe6c9bb 100644 --- a/common/modules/blog/migrations/m180605_190347_create_blog_posts_table.php +++ b/common/modules/blog/migrations/m180605_190347_create_blog_posts_table.php @@ -7,36 +7,36 @@ use yii\db\Migration; */ class m180605_190347_create_blog_posts_table extends Migration { - public function up() - { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + public function up() + { + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; - $this->createTable('{{%blog_posts}}', [ - 'id' => $this->primaryKey(), - 'category_id' => $this->integer()->notNull(), - 'published_at' => $this->integer()->unsigned()->notNull(), - 'created_at' => $this->integer()->unsigned(), - 'updated_at' => $this->integer()->unsigned(), - 'title' => $this->string()->notNull(), - 'description' => $this->text(), - 'content' => 'MEDIUMTEXT', - 'image' => $this->string(), - 'video' => $this->string(), - 'status' => $this->integer()->notNull(), - 'meta_json' => 'TEXT NOT NULL', - 'comments_count' => $this->integer()->notNull()->defaultValue(0), - 'views' => $this->integer()->notNull()->defaultValue(0), - 'slug' => $this->string()->notNull(), - ], $tableOptions); + $this->createTable('{{%blog_posts}}', [ + 'id' => $this->primaryKey(), + 'category_id' => $this->integer()->notNull(), + 'published_at' => $this->integer()->unsigned()->notNull(), + 'created_at' => $this->integer()->unsigned(), + 'updated_at' => $this->integer()->unsigned(), + 'title' => $this->string()->notNull(), + 'description' => $this->text(), + 'content' => 'MEDIUMTEXT', + 'image' => $this->string(), + 'video' => $this->string(), + 'status' => $this->integer()->notNull(), + 'meta_json' => 'TEXT NOT NULL', + 'comments_count' => $this->integer()->notNull()->defaultValue(0), + 'views' => $this->integer()->notNull()->defaultValue(0), + 'slug' => $this->string()->notNull(), + ], $tableOptions); - $this->createIndex('{{%idx-blog_posts-category_id}}', '{{%blog_posts}}', 'category_id'); - $this->createIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}', 'slug', true); - $this->addForeignKey('{{%fk-blog_posts-category_id}}', '{{%blog_posts}}', 'category_id', '{{%blog_categories}}', 'id'); - } + $this->createIndex('{{%idx-blog_posts-category_id}}', '{{%blog_posts}}', 'category_id'); + $this->createIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}', 'slug', true); + $this->addForeignKey('{{%fk-blog_posts-category_id}}', '{{%blog_posts}}', 'category_id', '{{%blog_categories}}', 'id'); + } - public function down() - { - $this->dropForeignKey('{{%fk-blog_posts-category_id}}', '{{%blog_posts}}'); - $this->dropTable('{{%blog_posts}}'); - } + public function down() + { + $this->dropForeignKey('{{%fk-blog_posts-category_id}}', '{{%blog_posts}}'); + $this->dropTable('{{%blog_posts}}'); + } } diff --git a/common/modules/blog/migrations/m180605_193423_create_blog_tags_table.php b/common/modules/blog/migrations/m180605_193423_create_blog_tags_table.php index 7fc15ee..5124ef1 100644 --- a/common/modules/blog/migrations/m180605_193423_create_blog_tags_table.php +++ b/common/modules/blog/migrations/m180605_193423_create_blog_tags_table.php @@ -7,22 +7,22 @@ use yii\db\Migration; */ class m180605_193423_create_blog_tags_table extends Migration { - public function up() - { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + public function up() + { + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; - $this->createTable('{{%blog_tags}}', [ - 'id' => $this->primaryKey(), - 'name' => $this->string()->notNull(), - 'slug' => $this->string()->notNull(), - ], $tableOptions); + $this->createTable('{{%blog_tags}}', [ + 'id' => $this->primaryKey(), + 'name' => $this->string()->notNull(), + 'slug' => $this->string()->notNull(), + ], $tableOptions); - $this->createIndex('{{%idx-blog_tags-slug}}', '{{%blog_tags}}', 'slug', true); - } + $this->createIndex('{{%idx-blog_tags-slug}}', '{{%blog_tags}}', 'slug', true); + } - public function down() - { - $this->dropIndex('{{%idx-blog_tags-slug}}', '{{%blog_tags}}'); - $this->dropTable('{{%blog_tags}}'); - } + public function down() + { + $this->dropIndex('{{%idx-blog_tags-slug}}', '{{%blog_tags}}'); + $this->dropTable('{{%blog_tags}}'); + } } diff --git a/common/modules/blog/migrations/m180605_193748_create_blog_tag_assignments_table.php b/common/modules/blog/migrations/m180605_193748_create_blog_tag_assignments_table.php index e535322..5dbeec4 100644 --- a/common/modules/blog/migrations/m180605_193748_create_blog_tag_assignments_table.php +++ b/common/modules/blog/migrations/m180605_193748_create_blog_tag_assignments_table.php @@ -7,30 +7,30 @@ use yii\db\Migration; */ class m180605_193748_create_blog_tag_assignments_table extends Migration { - public function up() - { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; + public function up() + { + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'; - $this->createTable('{{%blog_tag_assignments}}', [ - 'post_id' => $this->integer()->notNull(), - 'tag_id' => $this->integer()->notNull(), - ], $tableOptions); + $this->createTable('{{%blog_tag_assignments}}', [ + 'post_id' => $this->integer()->notNull(), + 'tag_id' => $this->integer()->notNull(), + ], $tableOptions); - $this->addPrimaryKey('{{%pk-blog_tag_assignments}}', '{{%blog_tag_assignments}}', ['post_id', 'tag_id']); + $this->addPrimaryKey('{{%pk-blog_tag_assignments}}', '{{%blog_tag_assignments}}', ['post_id', 'tag_id']); - $this->createIndex('{{%idx-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}', 'post_id'); - $this->createIndex('{{%idx-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}', 'tag_id'); + $this->createIndex('{{%idx-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}', 'post_id'); + $this->createIndex('{{%idx-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}', 'tag_id'); - $this->addForeignKey('{{%fk-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}', 'post_id', '{{%blog_posts}}', 'id', 'CASCADE', 'RESTRICT'); - $this->addForeignKey('{{%fk-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}', 'tag_id', '{{%blog_tags}}', 'id', 'CASCADE', 'RESTRICT'); - } + $this->addForeignKey('{{%fk-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}', 'post_id', '{{%blog_posts}}', 'id', 'CASCADE', 'RESTRICT'); + $this->addForeignKey('{{%fk-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}', 'tag_id', '{{%blog_tags}}', 'id', 'CASCADE', 'RESTRICT'); + } - public function down() - { - $this->dropIndex('{{%idx-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}'); - $this->dropIndex('{{%idx-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}'); - $this->dropForeignKey('{{%fk-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}'); - $this->dropForeignKey('{{%fk-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}'); - $this->dropTable('{{%blog_tag_assignments}}'); - } + public function down() + { + $this->dropIndex('{{%idx-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}'); + $this->dropIndex('{{%idx-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}'); + $this->dropForeignKey('{{%fk-blog_tag_assignments-tag_id}}', '{{%blog_tag_assignments}}'); + $this->dropForeignKey('{{%fk-blog_tag_assignments-post_id}}', '{{%blog_tag_assignments}}'); + $this->dropTable('{{%blog_tag_assignments}}'); + } } diff --git a/common/modules/blog/migrations/m180605_194207_create_blog_comments_table.php b/common/modules/blog/migrations/m180605_194207_create_blog_comments_table.php index 9a49387..4ed2dda 100644 --- a/common/modules/blog/migrations/m180605_194207_create_blog_comments_table.php +++ b/common/modules/blog/migrations/m180605_194207_create_blog_comments_table.php @@ -7,37 +7,37 @@ use yii\db\Migration; */ class m180605_194207_create_blog_comments_table extends Migration { - public function up() - { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + public function up() + { + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; - $this->createTable('{{%blog_comments}}', [ - 'id' => $this->primaryKey(), - 'post_id' => $this->integer()->notNull(), - 'user_id' => $this->integer()->notNull(), - 'parent_id' => $this->integer(), - 'created_at' => $this->integer()->unsigned()->notNull(), - 'text' => $this->text()->notNull(), - 'active' => $this->boolean()->notNull(), - ], $tableOptions); + $this->createTable('{{%blog_comments}}', [ + 'id' => $this->primaryKey(), + 'post_id' => $this->integer()->notNull(), + 'user_id' => $this->integer()->notNull(), + 'parent_id' => $this->integer(), + 'created_at' => $this->integer()->unsigned()->notNull(), + 'text' => $this->text()->notNull(), + 'active' => $this->boolean()->notNull(), + ], $tableOptions); - $this->createIndex('{{%idx-blog_comments-post_id}}', '{{%blog_comments}}', 'post_id'); - $this->createIndex('{{%idx-blog_comments-user_id}}', '{{%blog_comments}}', 'user_id'); - $this->createIndex('{{%idx-blog_comments-parent_id}}', '{{%blog_comments}}', 'parent_id'); + $this->createIndex('{{%idx-blog_comments-post_id}}', '{{%blog_comments}}', 'post_id'); + $this->createIndex('{{%idx-blog_comments-user_id}}', '{{%blog_comments}}', 'user_id'); + $this->createIndex('{{%idx-blog_comments-parent_id}}', '{{%blog_comments}}', 'parent_id'); - $this->addForeignKey('{{%fk-blog_comments-post_id}}', '{{%blog_comments}}', 'post_id', '{{%blog_posts}}', 'id', 'CASCADE'); - $this->addForeignKey('{{%fk-blog_comments-user_id}}', '{{%blog_comments}}', 'user_id', '{{%users}}', 'id', 'CASCADE'); - $this->addForeignKey('{{%fk-blog_comments-parent_id}}', '{{%blog_comments}}', 'parent_id', '{{%blog_comments}}', 'id', 'CASCADE'); - } + $this->addForeignKey('{{%fk-blog_comments-post_id}}', '{{%blog_comments}}', 'post_id', '{{%blog_posts}}', 'id', 'CASCADE'); + $this->addForeignKey('{{%fk-blog_comments-user_id}}', '{{%blog_comments}}', 'user_id', '{{%users}}', 'id', 'CASCADE'); + $this->addForeignKey('{{%fk-blog_comments-parent_id}}', '{{%blog_comments}}', 'parent_id', '{{%blog_comments}}', 'id', 'CASCADE'); + } - public function down() - { - $this->dropForeignKey('{{%fk-blog_comments-parent_id}}', '{{%blog_comments}}'); - $this->dropForeignKey('{{%fk-blog_comments-user_id}}', '{{%blog_comments}}'); - $this->dropForeignKey('{{%fk-blog_comments-post_id}}', '{{%blog_comments}}'); - $this->dropIndex('{{%idx-blog_comments-parent_id}}', '{{%blog_comments}}'); - $this->dropIndex('{{%idx-blog_comments-user_id}}', '{{%blog_comments}}'); - $this->dropIndex('{{%idx-blog_comments-post_id}}', '{{%blog_comments}}'); - $this->dropTable('{{%blog_comments}}'); - } + public function down() + { + $this->dropForeignKey('{{%fk-blog_comments-parent_id}}', '{{%blog_comments}}'); + $this->dropForeignKey('{{%fk-blog_comments-user_id}}', '{{%blog_comments}}'); + $this->dropForeignKey('{{%fk-blog_comments-post_id}}', '{{%blog_comments}}'); + $this->dropIndex('{{%idx-blog_comments-parent_id}}', '{{%blog_comments}}'); + $this->dropIndex('{{%idx-blog_comments-user_id}}', '{{%blog_comments}}'); + $this->dropIndex('{{%idx-blog_comments-post_id}}', '{{%blog_comments}}'); + $this->dropTable('{{%blog_comments}}'); + } } diff --git a/common/modules/blog/migrations/m180725_091725_add_blog_posts_type_field.php b/common/modules/blog/migrations/m180725_091725_add_blog_posts_type_field.php index 5ee8d0b..077ce65 100644 --- a/common/modules/blog/migrations/m180725_091725_add_blog_posts_type_field.php +++ b/common/modules/blog/migrations/m180725_091725_add_blog_posts_type_field.php @@ -12,11 +12,11 @@ class m180725_091725_add_blog_posts_type_field extends Migration */ public function safeUp() { - $this->addColumn('{{%blog_posts}}', 'type', $this->integer(2)->defaultValue(0)); // 0 - public, 1 - revision, 2 - preview - $this->addColumn('{{%blog_posts}}', 'revision_at', $this->integer()->unsigned()); - $this->addColumn('{{%blog_posts}}', 'revision_id', $this->integer()); + $this->addColumn('{{%blog_posts}}', 'type', $this->integer(2)->defaultValue(0)); // 0 - public, 1 - revision, 2 - preview + $this->addColumn('{{%blog_posts}}', 'revision_at', $this->integer()->unsigned()); + $this->addColumn('{{%blog_posts}}', 'revision_id', $this->integer()); - $this->createIndex('idx_blog_posts_revision_id', '{{%blog_posts}}', 'revision_id'); + $this->createIndex('idx_blog_posts_revision_id', '{{%blog_posts}}', 'revision_id'); } /** @@ -24,10 +24,10 @@ class m180725_091725_add_blog_posts_type_field extends Migration */ public function safeDown() { - $this->dropIndex('idx_blog_posts_revision_id', '{{%blog_posts}}'); + $this->dropIndex('idx_blog_posts_revision_id', '{{%blog_posts}}'); $this->dropColumn('{{%blog_posts}}', 'type'); - $this->dropColumn('{{%blog_posts}}', 'revision_at'); - $this->dropColumn('{{%blog_posts}}', 'revision_id'); + $this->dropColumn('{{%blog_posts}}', 'revision_at'); + $this->dropColumn('{{%blog_posts}}', 'revision_id'); } } diff --git a/common/modules/blog/migrations/m180725_113503_remove_blog_posts_slug_unique_index.php b/common/modules/blog/migrations/m180725_113503_remove_blog_posts_slug_unique_index.php index 0ffde39..8658c7c 100644 --- a/common/modules/blog/migrations/m180725_113503_remove_blog_posts_slug_unique_index.php +++ b/common/modules/blog/migrations/m180725_113503_remove_blog_posts_slug_unique_index.php @@ -12,8 +12,8 @@ class m180725_113503_remove_blog_posts_slug_unique_index extends Migration */ public function safeUp() { - $this->dropIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}'); - $this->createIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}', 'slug'); + $this->dropIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}'); + $this->createIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}', 'slug'); } /** @@ -21,7 +21,7 @@ class m180725_113503_remove_blog_posts_slug_unique_index extends Migration */ public function safeDown() { - $this->dropIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}'); - $this->createIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}', 'slug'); + $this->dropIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}'); + $this->createIndex('{{%idx-blog_posts-slug}}', '{{%blog_posts}}', 'slug'); } } diff --git a/common/modules/blog/migrations/m180827_195932_set_blog_unicode_collate.php b/common/modules/blog/migrations/m180827_195932_set_blog_unicode_collate.php index b5568f2..ddd92f0 100644 --- a/common/modules/blog/migrations/m180827_195932_set_blog_unicode_collate.php +++ b/common/modules/blog/migrations/m180827_195932_set_blog_unicode_collate.php @@ -12,15 +12,15 @@ class m180827_195932_set_blog_unicode_collate extends Migration */ public function safeUp() { - $tables = ['blog_tag_assignments']; - $db = Yii::$app->getDb(); - $db->createCommand('SET FOREIGN_KEY_CHECKS=0;')->execute(); + $tables = ['blog_tag_assignments']; + $db = Yii::$app->getDb(); + $db->createCommand('SET FOREIGN_KEY_CHECKS=0;')->execute(); - foreach ($tables as $table) { - $db->createCommand( "ALTER TABLE `$table` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci" )->execute(); - } + foreach ($tables as $table) { + $db->createCommand("ALTER TABLE `$table` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci")->execute(); + } - $db->createCommand('SET FOREIGN_KEY_CHECKS=1;')->execute(); + $db->createCommand('SET FOREIGN_KEY_CHECKS=1;')->execute(); } /** diff --git a/common/modules/blog/migrations/m180828_190314_create_blog_post_lng_table.php b/common/modules/blog/migrations/m180828_190314_create_blog_post_lng_table.php index 9608535..a058c85 100644 --- a/common/modules/blog/migrations/m180828_190314_create_blog_post_lng_table.php +++ b/common/modules/blog/migrations/m180828_190314_create_blog_post_lng_table.php @@ -12,28 +12,28 @@ class m180828_190314_create_blog_post_lng_table extends Migration */ public function safeUp() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%blog_posts_lng}}', [ - 'id' => $this->primaryKey(), - 'blog_post_id' => $this->integer()->notNull(), - 'language' => $this->string(6)->notNull(), - 'title' => $this->string()->notNull(), - 'description' => $this->text(), - 'content' => 'MEDIUMTEXT', - 'meta_title' => $this->string(255), + 'id' => $this->primaryKey(), + 'blog_post_id' => $this->integer()->notNull(), + 'language' => $this->string(6)->notNull(), + 'title' => $this->string()->notNull(), + 'description' => $this->text(), + 'content' => 'MEDIUMTEXT', + 'meta_title' => $this->string(255), 'meta_description' => $this->text(), - 'meta_keywords' => $this->string(255), + 'meta_keywords' => $this->string(255), ], $tableOptions); - $this->createIndex('idx_blog_posts_lng_language', '{{%blog_posts_lng}}', 'language'); - $this->createIndex('idx_blog_posts_lng_blog_post_id', '{{%blog_posts_lng}}', 'blog_post_id'); - $this->addForeignKey('frg_blog_posts_lng_blog_posts_blog_post_id_id', '{{%blog_posts_lng}}', 'blog_post_id', '{{%blog_posts}}', 'id', 'CASCADE', 'CASCADE'); + $this->createIndex('idx_blog_posts_lng_language', '{{%blog_posts_lng}}', 'language'); + $this->createIndex('idx_blog_posts_lng_blog_post_id', '{{%blog_posts_lng}}', 'blog_post_id'); + $this->addForeignKey('frg_blog_posts_lng_blog_posts_blog_post_id_id', '{{%blog_posts_lng}}', 'blog_post_id', '{{%blog_posts}}', 'id', 'CASCADE', 'CASCADE'); - $this->dropColumn('{{%blog_posts}}', 'title'); - $this->dropColumn('{{%blog_posts}}', 'description'); - $this->dropColumn('{{%blog_posts}}', 'content'); - $this->dropColumn('{{%blog_posts}}', 'meta_json'); + $this->dropColumn('{{%blog_posts}}', 'title'); + $this->dropColumn('{{%blog_posts}}', 'description'); + $this->dropColumn('{{%blog_posts}}', 'content'); + $this->dropColumn('{{%blog_posts}}', 'meta_json'); } /** @@ -41,14 +41,14 @@ class m180828_190314_create_blog_post_lng_table extends Migration */ public function safeDown() { - $this->addColumn('{{%blog_posts}}', 'title', $this->string(255)->notNull()); - $this->addColumn('{{%blog_posts}}', 'description', $this->text()); - $this->addColumn('{{%blog_posts}}', 'description', 'MEDIUMTEXT'); - $this->addColumn('{{%blog_posts}}', 'meta_json', $this->text()); + $this->addColumn('{{%blog_posts}}', 'title', $this->string(255)->notNull()); + $this->addColumn('{{%blog_posts}}', 'description', $this->text()); + $this->addColumn('{{%blog_posts}}', 'description', 'MEDIUMTEXT'); + $this->addColumn('{{%blog_posts}}', 'meta_json', $this->text()); - $this->dropForeignKey('frg_blog_posts_lng_blog_posts_blog_post_id_id', '{{%blog_posts_lng}}'); - $this->dropIndex('idx_blog_posts_lng_blog_post_id', '{{%blog_posts_lng}}'); - $this->dropIndex('idx_blog_posts_lng_language', '{{%blog_posts_lng}}'); + $this->dropForeignKey('frg_blog_posts_lng_blog_posts_blog_post_id_id', '{{%blog_posts_lng}}'); + $this->dropIndex('idx_blog_posts_lng_blog_post_id', '{{%blog_posts_lng}}'); + $this->dropIndex('idx_blog_posts_lng_language', '{{%blog_posts_lng}}'); $this->dropTable('{{%blog_posts_lng}}'); } } diff --git a/common/modules/blog/migrations/m180830_163050_create_blog_categories_lng_table.php b/common/modules/blog/migrations/m180830_163050_create_blog_categories_lng_table.php index 95967be..f1b48e8 100644 --- a/common/modules/blog/migrations/m180830_163050_create_blog_categories_lng_table.php +++ b/common/modules/blog/migrations/m180830_163050_create_blog_categories_lng_table.php @@ -12,28 +12,28 @@ class m180830_163050_create_blog_categories_lng_table extends Migration */ public function safeUp() { - $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; $this->createTable('{{%blog_categories_lng}}', [ - 'id' => $this->primaryKey(), + 'id' => $this->primaryKey(), 'blog_category_id' => $this->integer()->notNull(), - 'language' => $this->string(6)->notNull(), - 'name' => $this->string()->notNull(), - 'title' => $this->string(), - 'description' => $this->text(), - 'meta_title' => $this->string(255), + 'language' => $this->string(6)->notNull(), + 'name' => $this->string()->notNull(), + 'title' => $this->string(), + 'description' => $this->text(), + 'meta_title' => $this->string(255), 'meta_description' => $this->text(), - 'meta_keywords' => $this->string(255), + 'meta_keywords' => $this->string(255), ], $tableOptions); - $this->createIndex('idx_blog_categories_lng_language', '{{%blog_categories_lng}}', 'language'); - $this->createIndex('idx_blog_categories_lng_blog_category_id', '{{%blog_categories_lng}}', 'blog_category_id'); - $this->addForeignKey('frg_blog_categories_lng_blog_categories_blog_category_id_id', '{{%blog_categories_lng}}', 'blog_category_id', '{{%blog_categories}}', 'id', 'CASCADE', 'CASCADE'); + $this->createIndex('idx_blog_categories_lng_language', '{{%blog_categories_lng}}', 'language'); + $this->createIndex('idx_blog_categories_lng_blog_category_id', '{{%blog_categories_lng}}', 'blog_category_id'); + $this->addForeignKey('frg_blog_categories_lng_blog_categories_blog_category_id_id', '{{%blog_categories_lng}}', 'blog_category_id', '{{%blog_categories}}', 'id', 'CASCADE', 'CASCADE'); - $this->dropColumn('{{%blog_categories}}', 'title'); - $this->dropColumn('{{%blog_categories}}', 'description'); - $this->dropColumn('{{%blog_categories}}', 'name'); - $this->dropColumn('{{%blog_categories}}', 'meta_json'); + $this->dropColumn('{{%blog_categories}}', 'title'); + $this->dropColumn('{{%blog_categories}}', 'description'); + $this->dropColumn('{{%blog_categories}}', 'name'); + $this->dropColumn('{{%blog_categories}}', 'meta_json'); } /** @@ -41,15 +41,15 @@ class m180830_163050_create_blog_categories_lng_table extends Migration */ public function safeDown() { - $this->dropForeignKey('frg_blog_categories_lng_blog_categories_blog_category_id_id', '{{%blog_categories_lng}}'); - $this->dropIndex('idx_blog_categories_lng_blog_category_id', '{{%blog_categories_lng}}'); - $this->dropIndex('idx_blog_categories_lng_language', '{{%blog_categories_lng}}'); + $this->dropForeignKey('frg_blog_categories_lng_blog_categories_blog_category_id_id', '{{%blog_categories_lng}}'); + $this->dropIndex('idx_blog_categories_lng_blog_category_id', '{{%blog_categories_lng}}'); + $this->dropIndex('idx_blog_categories_lng_language', '{{%blog_categories_lng}}'); $this->dropTable('{{%blog_categories_lng}}'); $this->addColumn('{{%blog_categories}}', 'title', $this->string(255)); - $this->addColumn('{{%blog_categories}}', 'name', $this->string(255)->notNull()); - $this->addColumn('{{%blog_categories}}', 'description', $this->text()); - $this->addColumn('{{%blog_categories}}', 'meta_json', 'LONGTEXT NOT NULL'); + $this->addColumn('{{%blog_categories}}', 'name', $this->string(255)->notNull()); + $this->addColumn('{{%blog_categories}}', 'description', $this->text()); + $this->addColumn('{{%blog_categories}}', 'meta_json', 'LONGTEXT NOT NULL'); } } diff --git a/common/modules/forms/manifest.php b/common/modules/forms/manifest.php index 1ed9e60..52c2110 100644 --- a/common/modules/forms/manifest.php +++ b/common/modules/forms/manifest.php @@ -1,13 +1,11 @@ '1.0.1', - 'name' => 'forms', - 'description' => 'Form widget generator for site', - 'module' => 'FormsModule', - 'permissions' => [ - 'FormsManagement' => [ - 'description' => 'Forms management' - ], - ], + 'version' => '1.0.1', + 'name' => 'forms', + 'description' => 'Form widget generator for site', + 'module' => 'FormsModule', + 'permissions' => [ + 'FormsManagement' => 'Forms management', + ], ]; \ No newline at end of file diff --git a/common/modules/languages/manifest.php b/common/modules/languages/manifest.php index 0f7faeb..328eb28 100644 --- a/common/modules/languages/manifest.php +++ b/common/modules/languages/manifest.php @@ -1,13 +1,11 @@ '1.0.1', - 'name' => 'languages', - 'description' => 'Web site languages management', - 'module' => 'LanguagesModule', - 'permissions' => [ - 'LanguagesManagement' => [ - 'description' => 'Languages management' - ], - ], -]; \ No newline at end of file + 'version' => '1.0.1', + 'name' => 'languages', + 'description' => 'Web site languages management', + 'module' => 'LanguagesModule', + 'permissions' => [ + 'LanguagesManagement' => 'Languages management', + ], +]; diff --git a/common/modules/links/manifest.php b/common/modules/links/manifest.php index 8f10f34..c392314 100644 --- a/common/modules/links/manifest.php +++ b/common/modules/links/manifest.php @@ -1,8 +1,8 @@ '1.0.1', - 'name' => 'links', - 'description' => 'Custom links in web site menu', - 'module' => 'LinksModule', -]; \ No newline at end of file + 'version' => '1.0.1', + 'name' => 'links', + 'description' => 'Custom links in web site menu', + 'module' => 'LinksModule', +]; diff --git a/common/modules/pages/manifest.php b/common/modules/pages/manifest.php index a6fdf36..475d044 100644 --- a/common/modules/pages/manifest.php +++ b/common/modules/pages/manifest.php @@ -1,13 +1,11 @@ '1.0.1', - 'name' => 'pages', - 'description' => 'Custom pages on site with slug', - 'module' => 'PagesModule', - 'permissions' => [ - 'PagesManagement' => [ - 'description' => 'Manage website pages' - ], - ], -]; \ No newline at end of file + 'version' => '1.0.1', + 'name' => 'pages', + 'description' => 'Custom pages on site with slug', + 'module' => 'PagesModule', + 'permissions' => [ + 'PagesManagement' => 'Manage website pages', + ], +];