"라라벨 artisan make:migration --create"의 두 판 사이의 차이

잔글 (Jmnote 사용자가 라라벨 artisan make:migration 문서를 라라벨 artisan make:migration --create 문서로 옮겼습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;<nowiki>라라벨 artisan make:migration</nowiki>
;<nowiki>라라벨 artisan make:migration --create</nowiki>
*[[artisan make:migration]]에 <code>--create</code> 옵션을 붙인 것


<source lang='console'>
<source lang='console'>

2016년 5월 15일 (일) 18:09 판

1 개요

라라벨 artisan make:migration --create
root@zetawiki:/var/www/laravel# php artisan make:migration create_photos_table --create=photos
Created Migration: 2016_05_15_090058_create_photos_table
root@zetawiki:/var/www/laravel# php artisan migrate:status
+------+------------------------------------------------+
| Ran? | Migration                                      |
+------+------------------------------------------------+
| Y    | 2014_10_12_100000_create_password_resets_table |
| Y    | 2015_10_27_141258_create_tasks_table           |
| N    | 2016_05_15_090058_create_photos_table          |
+------+------------------------------------------------+
root@zetawiki:/var/www/laravel# cat database/migrations/2016_05_15_090058_create_photos_table.php
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePhotosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('photos', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('photos');
    }
}

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}