Hi.
When i create new migration with renaming and adding new column then migration was sucсessfully executed, but in table was occurred only renaming without adding.
But when i create two separate migration for every action then all ok.
Database is sqlite3.
Yes.
If make that creating migration with migration what i posted above, result in table will be only "id, title, bodyfull, published_at, created_at, updated_at" and all migration was successfull
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateArticlesMigration extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('articles', function(Blueprint $table)
{
$table->increments('id');
$table->string('title',100);
$table->text('body');
$table->timestamp('published_at');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('articles');
}
}
Yes. And i tried to add that in next migration with renaming.
First migration -> creating table "articles" with title,body and timestamps
Second migration -> adding description and renaming body in bodyfull
It's weird, I'm using string instead of text, setting it to nullable just in case. A 'description' field is not being created at all. =/
See if this happens in a MySQL database. I tried using integer too, and it doesn't create the column either. I'm guessing it has something to do with sqlite.