Skip to content

Commit

Permalink
Fixes #113: ликвидация "Проектов" (#115)
Browse files Browse the repository at this point in the history
Дополнительно для большей чистоты можно сделать следующее:
1) Удалить на боевом сервере папку с изображениями проектов (была задана через параметр 'path.to.project.images')
2) Перегенерировать файлы переводов (в папке 'messages')
  • Loading branch information
rugabarbo authored and samdark committed Jan 28, 2017
1 parent cd2223b commit d84e354
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 1,884 deletions.
1 change: 0 additions & 1 deletion assets/AppAsset.php
Expand Up @@ -14,7 +14,6 @@ class AppAsset extends AssetBundle
public $js = [
'js/qa.js',
'js/jquery.sticky.js',
'js/jquery.ThreeDots.min.js',
'js/yiiscript.js',
];
public $depends = [
Expand Down
2 changes: 0 additions & 2 deletions config/system/params.php
Expand Up @@ -3,8 +3,6 @@
'adminEmail' => 'sam@rmcreaetive.ru',
'supportEmail' => 'noreply@yiiframework.ru',
'user.passwordResetTokenExpire' => 3600,
'path.to.project.images' => dirname(dirname(__DIR__)) . '/files/project-images/',
'url.to.project.images' => '/files/project-images/',
'user.rememberMeDuration' => 3600 * 24 * 30,
'user.resendVerified' => 900,
];
227 changes: 0 additions & 227 deletions controllers/ProjectController.php

This file was deleted.

38 changes: 38 additions & 0 deletions migrations/m170128_104216_drop_projects.php
@@ -0,0 +1,38 @@
<?php

use yii\db\Migration;

class m170128_104216_drop_projects extends Migration
{
public function up()
{
$this->dropForeignKey('fk-image-project_id-project-id', 'project_image');
$this->dropForeignKey('fk-project-user_id-user-id', 'project');

$this->dropTable('project_image');
$this->dropTable('project');
}

public function down()
{
$this->createTable('project', [
'id' => $this->primaryKey(),
'title' => $this->string()->notNull(),
'link' => $this->string()->notNull(),
'body' => 'MEDIUMTEXT NOT NULL',
'user_id' => $this->integer(),
'status' => $this->smallInteger()->notNull()->defaultValue(10),
'created_at' => $this->integer()->notNull(),
'updated_at' => $this->integer()->notNull(),
]);

$this->createTable('project_image', [
'id' => $this->primaryKey(),
'project_id' => $this->integer(),
'name' => $this->string(32)->notNull(),
]);

$this->addForeignKey('fk-project-user_id-user-id', 'project', 'user_id', 'user', 'id');
$this->addForeignKey('fk-image-project_id-project-id', 'project_image', 'project_id', 'project', 'id');
}
}
95 changes: 0 additions & 95 deletions models/Project.php

This file was deleted.

0 comments on commit d84e354

Please sign in to comment.