Answers for "run migration in laravel"

PHP
1

laravel run single migration

php artisan migrate --path=/database/migrations/my_migration.php
Posted by: Guest on January-05-2021
5

migration rollback

php artisan migrate:rollback
Posted by: Guest on May-04-2020
1

laravel run query migration

DB::statement("
    CREATE TABLE `your_table` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `status` tinyint(3) unsigned DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
Posted by: Guest on August-23-2021
0

Generate Laravel Migrations from an existing database

composer require --dev "xethron/migrations-generator"
Posted by: Guest on March-14-2021
0

laravel migration drop foreign keys

$table->dropIndex(['state']); // Drops index 'geo_state_index'
Posted by: Guest on November-30-2020

Code answers related to "run migration in laravel"

Browse Popular Code Answers by Language