diff --git a/backend/config/test-local.php b/backend/config/test-local.php new file mode 100644 index 0000000..4513a34 --- /dev/null +++ b/backend/config/test-local.php @@ -0,0 +1,9 @@ + [ + 'db' => [ + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced_test', + ] + ], + ] +); diff --git a/console/migrations/m161031_160156_blog.php b/console/migrations/m161031_160156_blog.php new file mode 100644 index 0000000..6a30e7e --- /dev/null +++ b/console/migrations/m161031_160156_blog.php @@ -0,0 +1,43 @@ +createTable( + 'blog_article', + [ + 'id' => $this->primaryKey(), + 'image' => $this->string(255), + 'created_at' => $this->integer(), + 'updated_at' => $this->integer(), + 'deleted_at' => $this->integer(), + 'sort' => $this->integer(), + 'status' => $this->boolean(), + 'author_id' => $this->integer(), + ] + ); + + $this->createTable( + 'blog_article_lang', + [ + 'title' => $this->string(255), + 'body' => $this->text(), + 'body_preview' => $this->text(), + 'alias' => $this->string(255), + 'meta_title' => $this->string(255), + 'meta_description' => $this->string(255), + 'h1' => $this->string(255), + 'seo_text' => $this->string(255), + ] + ); + } + + public function down() + { + + } + } diff --git a/frontend/config/test-local.php b/frontend/config/test-local.php new file mode 100644 index 0000000..4513a34 --- /dev/null +++ b/frontend/config/test-local.php @@ -0,0 +1,9 @@ +