migration rollback
php artisan migrate:rollback
migration rollback
php artisan migrate:rollback
ef migrations
PM> add-migration MyFirstMigration
PM> Update-Database
ef rollback migration
//EF 6.4
//PM> Update-Database -TargetMigration:"NameOfSecondToLastMigration"
fresh migrqte laravel
$ php artisan migrate:fresh
Dropped all tables successfully.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table
migrations.RunSQL
def set_pg_sequence(apps, schema_editor):
if connection.vendor == "postgresql":
# Reset sequence of user so Postgres doesn't crash on an existing user
# ID 100 for our uploader user.
# http://stackoverflow.com/a/3698777/85461
migrations.RunSQL(
"""
SELECT pg_catalog.setval(
pg_get_serial_sequence('auth_user', 'id'), MAX(id)
) FROM auth_user;
""".format(table_name=settings.AUTH_USER_MODEL)
)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us