Answers for "adding a new table to database migration"

PHP
9

git commit

git add index.html css/styles.css
git add .
git commit -m "Change titles and styling on homepage"
Posted by: Guest on August-28-2020
2

how to commit changes in git command

git commit -a
Posted by: Guest on April-14-2020
3

add a new column to existing table in a migration

// for Laravel 5+
php artisan make:migration add_email_to_users_table --table=users

public function up()
{
    Schema::table('users', function($table) {
        $table->integer('email');
    });
}

public function down()
{
    Schema::table('users', function($table) {
        $table->dropColumn('email');
    });
}

php artisan migrate
Posted by: Guest on January-01-2021

Code answers related to "adding a new table to database migration"

Browse Popular Code Answers by Language