Browse Source

Fix modules manifest permissions

master
Egorka 6 years ago
parent
commit
c855f3c8cd
  1. 16
      common/modules/banners/manifest.php
  2. 30
      common/modules/banners/migrations/m180821_084231_create_banners_table.php
  3. 12
      common/modules/banners/migrations/m180821_100724_create_banners_places_table.php
  4. 6
      common/modules/banners/migrations/m180821_100959_add_banners_place_id_field.php
  5. 16
      common/modules/blog/manifest.php
  6. 36
      common/modules/blog/migrations/m180605_184534_create_blog_categories_table.php
  7. 58
      common/modules/blog/migrations/m180605_190347_create_blog_posts_table.php
  8. 30
      common/modules/blog/migrations/m180605_193423_create_blog_tags_table.php
  9. 42
      common/modules/blog/migrations/m180605_193748_create_blog_tag_assignments_table.php
  10. 58
      common/modules/blog/migrations/m180605_194207_create_blog_comments_table.php
  11. 14
      common/modules/blog/migrations/m180725_091725_add_blog_posts_type_field.php
  12. 8
      common/modules/blog/migrations/m180725_113503_remove_blog_posts_slug_unique_index.php
  13. 14
      common/modules/blog/migrations/m180827_195932_set_blog_unicode_collate.php
  14. 46
      common/modules/blog/migrations/m180828_190314_create_blog_post_lng_table.php
  15. 42
      common/modules/blog/migrations/m180830_163050_create_blog_categories_lng_table.php
  16. 16
      common/modules/forms/manifest.php
  17. 16
      common/modules/languages/manifest.php
  18. 8
      common/modules/links/manifest.php
  19. 16
      common/modules/pages/manifest.php

16
common/modules/banners/manifest.php

@ -1,13 +1,11 @@
<?php
return [
'version' => '1.0.1',
'name' => 'banners',
'description' => 'Banners management and rotation system for site',
'module' => 'BannersModule',
'permissions' => [
'BannersManagement' => [
'description' => 'Manage banners system'
],
],
'version' => '1.0.1',
'name' => 'banners',
'description' => 'Banners management and rotation system for site',
'module' => 'BannersModule',
'permissions' => [
'BannersManagement' => 'Manage banners system',
],
];

30
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);
}

12
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);
}

6
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');
}
/**

16
common/modules/blog/manifest.php

@ -1,13 +1,11 @@
<?php
return [
'version' => '1.0.1',
'name' => 'blog',
'description' => 'Blog system for site with comments and slug',
'module' => 'BlogModule',
'permissions' => [
'BlogManagement' => [
'description' => 'Blog management system'
],
],
'version' => '1.0.1',
'name' => 'blog',
'description' => 'Blog system for site with comments and slug',
'module' => 'BlogModule',
'permissions' => [
'BlogManagement' => 'Blog management system'
],
];

36
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}}');
}
}

58
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}}');
}
}

30
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}}');
}
}

42
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}}');
}
}

58
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}}');
}
}

14
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');
}
}

8
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');
}
}

14
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();
}
/**

46
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}}');
}
}

42
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');
}
}

16
common/modules/forms/manifest.php

@ -1,13 +1,11 @@
<?php
return [
'version' => '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',
],
];

16
common/modules/languages/manifest.php

@ -1,13 +1,11 @@
<?php
return [
'version' => '1.0.1',
'name' => 'languages',
'description' => 'Web site languages management',
'module' => 'LanguagesModule',
'permissions' => [
'LanguagesManagement' => [
'description' => 'Languages management'
],
],
'version' => '1.0.1',
'name' => 'languages',
'description' => 'Web site languages management',
'module' => 'LanguagesModule',
'permissions' => [
'LanguagesManagement' => 'Languages management',
],
];

8
common/modules/links/manifest.php

@ -1,8 +1,8 @@
<?php
return [
'version' => '1.0.1',
'name' => 'links',
'description' => 'Custom links in web site menu',
'module' => 'LinksModule',
'version' => '1.0.1',
'name' => 'links',
'description' => 'Custom links in web site menu',
'module' => 'LinksModule',
];

16
common/modules/pages/manifest.php

@ -1,13 +1,11 @@
<?php
return [
'version' => '1.0.1',
'name' => 'pages',
'description' => 'Custom pages on site with slug',
'module' => 'PagesModule',
'permissions' => [
'PagesManagement' => [
'description' => 'Manage website pages'
],
],
'version' => '1.0.1',
'name' => 'pages',
'description' => 'Custom pages on site with slug',
'module' => 'PagesModule',
'permissions' => [
'PagesManagement' => 'Manage website pages',
],
];
Loading…
Cancel
Save