Ok, so this is the problem.
I have a package (deb for debian) that is installing my software in a Linux box. The steps are:
- Install the dependencies needed
- Copy the PHP source code
- Install mysql
- Creates a post-install script that will run after the first reboot.
- The post install do
- Creation of user for the database
composer install
php artisan migrate --force --step
The migrations are like this:
// migration1.php
public function up()
{
Schema::create('table', function(Blueprint $table) {
$table->string('field');
});
}
// migration2.php
public function up()
{
Schema::table('table', function(Blueprint $table) {
$table->boolean('another_field');
});
}
The problem I have is, the database gets stuck on the second migration. It does not show any error, it does not complain, simply it does not work... What is even weird, is if I run the migrations not in the post-inst script, but after ssh
ing into the box, it runs ok: no problems, no stuck...
Any ideas?