diff --git a/console/migrations/m160301_105759_chat.php b/console/migrations/m160301_105759_chat.php new file mode 100644 index 0000000..26df526 --- /dev/null +++ b/console/migrations/m160301_105759_chat.php @@ -0,0 +1,27 @@ +createTable('{{%chat}}', [ + 'chat_id' => $this->primaryKey(), + 'status' => $this->string(), + 'comment' => $this->string(), + 'from_user' => $this->integer(), + 'to_user' => $this->integer(), + ]); + + $this->addForeignKey('chat_from_user', '{{%chat}}', 'from_user', '{{%user}}', 'id', 'SET NULL', 'NO ACTION'); + $this->addForeignKey('chat_to_user', '{{%chat}}', 'to_user', '{{%user}}', 'id', 'SET NULL', 'NO ACTION'); + } + + public function down() + { + $this->dropForeignKey('chat_from_user', '{{%chat}}'); + $this->dropForeignKey('chat_to_user', '{{%chat}}'); + $this->dropTable('{{%chat}}'); + } +} diff --git a/frontend/views/layouts/admin.php b/frontend/views/layouts/admin.php index 187ac96..f26424f 100755 --- a/frontend/views/layouts/admin.php +++ b/frontend/views/layouts/admin.php @@ -12,118 +12,118 @@ use yii\widgets\Menu; $this->beginContent('@app/views/layouts/main.php'); ?>
-
-
- -
+
+
+ endContent() ?> \ No newline at end of file -- libgit2 0.21.4