Skip to content

Commit 3979a73

Browse files
author
fengr06
committed
alert name
1 parent bf9e61e commit 3979a73

10 files changed

Lines changed: 68 additions & 16 deletions

‎README.md‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
# mrcoderBlog
1+
# mrcoderBlog
2+
3+
git clone https://github.com/FrCoderBlog/mrcoderBlog.git blog
4+
cd blog
5+
composer install
6+
composer dump-autoload
7+
php artisan key:generate
8+
vim .env
9+
php artisan migrate
10+
php artisan db:seed --class=UsersTableSeeder
11+
php artisan storage:link
12+
13+
14+
15+
16+

database/migrations/2014_10_12_000000_create_users_table.php renamed to database/migrations/2019_01_01_000000_create_users_table.php

File renamed without changes.

database/migrations/2018_02_01_032005_create_articles_table.php renamed to database/migrations/2019_01_01_032005_create_articles_table.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ public function up()
1515
{
1616
Schema::create('articles', function (Blueprint $table) {
1717
$table->increments('id');
18-
$table->string('title');
19-
$table->string('cover')->nullable();
18+
$table->string('title', 50);
19+
$table->integer('cate_id');
20+
$table->string('cover', 50)->nullable();
2021
$table->longText('content_raw')->nullable();
2122
$table->longText('content_html')->nullable();
2223
$table->longText('content_markdown')->nullable();

database/migrations/2014_10_12_100000_create_password_resets_table.php renamed to database/migrations/2019_01_01_100000_create_password_resets_table.php

File renamed without changes.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateCatesTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('cates', function (Blueprint $table) {
17+
$table->increments('id');
18+
$table->string('name', 50);
19+
$table->integer('article_num')->default(0);
20+
$table->integer('search_num')->default(0);
21+
$table->timestamps();
22+
});
23+
}
24+
25+
/**
26+
* Reverse the migrations.
27+
*
28+
* @return void
29+
*/
30+
public function down()
31+
{
32+
Schema::dropIfExists('tags');
33+
}
34+
}

database/migrations/2018_02_25_170608_create_tags_table.php renamed to database/migrations/2019_01_01_170608_create_tags_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function up()
1515
{
1616
Schema::create('tags', function (Blueprint $table) {
1717
$table->increments('id');
18-
$table->string('name');//标签名称
18+
$table->string('name', 50);//标签名称
1919
$table->integer('article_num')->default(0);//对应的文章数
2020
$table->integer('search_num')->default(0);//搜索热度
2121
$table->timestamps();

database/migrations/2018_02_25_171637_create_article_tag_table.php renamed to database/migrations/2019_01_01_171637_create_article_tag_table.php

File renamed without changes.

database/migrations/2018_11_02_191211_create_settings_table.php renamed to database/migrations/2019_01_01_191211_create_settings_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public function up()
1515
{
1616
Schema::create('settings', function (Blueprint $table) {
1717
$table->increments('id');
18-
$table->string('key')->unique(); //设置项的:键
19-
$table->string('value'); //设置项的:值
20-
$table->string('name')->nullable(); //设置项的:名称
21-
$table->string('content')->nullable(); //设置项的:介绍
18+
$table->string('key', 50)->unique(); //设置项的:键
19+
$table->string('value', 50); //设置项的:值
20+
$table->string('name', 50)->nullable(); //设置项的:名称
21+
$table->string('content', 255)->nullable(); //设置项的:介绍
2222
$table->timestamps();
2323
});
2424
}

database/migrations/2018_02_09_203045_create_comments_table.php renamed to database/migrations/2019_01_01_203045_create_comments_table.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ public function up()
2020
$table->integer('target_id')->default(0);
2121
$table->integer('user_id')->default(0);
2222
$table->text('content');
23-
$table->string('name')->nullable();
24-
$table->string('email')->nullable();
25-
$table->string('website')->nullable();
26-
$table->string('avatar')->nullable();
27-
$table->string('ip')->nullable();
28-
$table->string('city')->nullable();
23+
$table->string('os', 50)->nullable();
24+
$table->string('browser', 50)->nullable();
25+
$table->string('name', 50)->nullable();
26+
$table->string('email', 50)->nullable();
27+
$table->string('website', 100)->nullable();
28+
$table->string('avatar', 255)->nullable();
29+
$table->string('ip', 50)->nullable();
30+
$table->string('city', 50)->nullable();
2931
$table->timestamps();
3032
});
3133
}

database/migrations/2018_12_09_222555_create_blacklist_table.php renamed to database/migrations/2019_01_01_222555_create_blacklist_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public function up()
1515
{
1616
Schema::create('blacklist', function (Blueprint $table) {
1717
$table->increments('id');
18-
$table->string('ip');
19-
$table->string('action')->nullable();
18+
$table->string('ip', 50);
19+
$table->string('action', 50)->nullable();
2020
$table->timestamps();
2121
});
2222
}

0 commit comments

Comments
 (0)