Delete all migrations and start migrations from current DB

Steven Sproat

I have about 150 migrations currently in a project, and all the .resx files are causing my DLL's size to balloon - the compiled DLL is over 7.5MB now which is pretty crazy.

Is there a way to clear all existing migrations, and tell Entity Framework that the current version of the database is the starting point, and any future migrations will use this database as the base one.

Masoud

You can delete all migrations file, delete __MigrationHistory table in your database and then run following commands in Package Manager Console:

PM>Enable-Migrations
PM>AddMigration [A_Name_For_Your_Migration] -IgnoreChanges
PM>Update-Database

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

django 1.7 migrations -- how do I clear all migrations and start over from scratch?

From Dev

Loading the DB dumb, and running all the migrations

From Dev

Rerun all db migrations on Heroku (rake db:migrate:reset)

From Dev

CodeFirst DB Migrations with Azure

From Dev

Capistrano deploy:migrate and db:migrate run all migrations every time

From Dev

Rake db:migrate just reverted (rolled back) all the migrations

From Dev

from django.db import models, migrations ImportError: cannot import name migrations

From Dev

Rollback all migrations with ragtime

From Java

All the migrations are working inappropriately

From Dev

Rollback all the migrations in ActiveRecord

From Dev

Migrations from database

From Dev

Doctrine Migrations in new DB setup

From Dev

DB migrations (Liquibase + Maven + Spring)

From Dev

EF backward compatible DB migrations

From Dev

Db migrations in zend framework 2

From Dev

Automatic db router for migrations in django

From Dev

Db migrations in zend framework 2

From Dev

How to clear history and run all migrations from the beginning?

From Java

Are there any concepts for firestore db schema migrations comparable to rails ActiveRecord migrations?

From Dev

How can I fix my migrations? ActiveRecord::Migrator.current_version and db:migrate:status are wrong

From Dev

Stuck in a django migration IntegrityError loop: can I delete those migrations that aren't yet in the db?

From Dev

Running doctrine migrations from composer

From Dev

Django 1.7 - migrations from South

From Dev

Django run code on application start but not on migrations

From Java

django.db.migrations.exceptions.InconsistentMigrationHistory

From Dev

heroku run rake db:migrate reverts migrations

From Dev

django.db.migrations.exceptions.NodeNotFoundError

From Dev

Code First migrations updating the wrong Db on localdb

From Dev

How to do Migrations in DB first approach

Related Related

  1. 1

    django 1.7 migrations -- how do I clear all migrations and start over from scratch?

  2. 2

    Loading the DB dumb, and running all the migrations

  3. 3

    Rerun all db migrations on Heroku (rake db:migrate:reset)

  4. 4

    CodeFirst DB Migrations with Azure

  5. 5

    Capistrano deploy:migrate and db:migrate run all migrations every time

  6. 6

    Rake db:migrate just reverted (rolled back) all the migrations

  7. 7

    from django.db import models, migrations ImportError: cannot import name migrations

  8. 8

    Rollback all migrations with ragtime

  9. 9

    All the migrations are working inappropriately

  10. 10

    Rollback all the migrations in ActiveRecord

  11. 11

    Migrations from database

  12. 12

    Doctrine Migrations in new DB setup

  13. 13

    DB migrations (Liquibase + Maven + Spring)

  14. 14

    EF backward compatible DB migrations

  15. 15

    Db migrations in zend framework 2

  16. 16

    Automatic db router for migrations in django

  17. 17

    Db migrations in zend framework 2

  18. 18

    How to clear history and run all migrations from the beginning?

  19. 19

    Are there any concepts for firestore db schema migrations comparable to rails ActiveRecord migrations?

  20. 20

    How can I fix my migrations? ActiveRecord::Migrator.current_version and db:migrate:status are wrong

  21. 21

    Stuck in a django migration IntegrityError loop: can I delete those migrations that aren't yet in the db?

  22. 22

    Running doctrine migrations from composer

  23. 23

    Django 1.7 - migrations from South

  24. 24

    Django run code on application start but not on migrations

  25. 25

    django.db.migrations.exceptions.InconsistentMigrationHistory

  26. 26

    heroku run rake db:migrate reverts migrations

  27. 27

    django.db.migrations.exceptions.NodeNotFoundError

  28. 28

    Code First migrations updating the wrong Db on localdb

  29. 29

    How to do Migrations in DB first approach

HotTag

Archive