Questions tagged [migration]

An action of moving between major versions of any framework, product or language, or, just as commonly, alteration to the data schema of an application. This might involve modifying existing data to make it work with the new version.

An action of moving between major versions of any framework, product or language, or, just as commonly, alteration to the data schema of an application. This might involve modifying existing data to make it work with the new version.

11009 questions
142
votes
27 answers

Package Manager Console Enable-Migrations CommandNotFoundException only in a specific VS project

I tried to run the command 'Enable-Migrations' in a new project and I got the message: PM> Enable-Migrations The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of…
Eduardo Brites
  • 4,597
  • 5
  • 36
  • 51
141
votes
5 answers

Migrating from JSF 1.2 to JSF 2.0

I am working with a rather large app written in JSF 1.2. JSF 1.2 is around 6 years old now. I need to upgrade to JSF 2.0. How painful will this be? I noticed that some attributes in custom tags have been changed etc.
mkoryak
  • 57,086
  • 61
  • 201
  • 257
139
votes
20 answers

Mechanisms for tracking DB schema changes

What are the best methods for tracking and/or automating DB schema changes? Our team uses Subversion for version control and we've been able to automate some of our tasks this way (pushing builds up to a staging server, deploying tested code to a…
pix0r
  • 31,139
  • 18
  • 86
  • 102
133
votes
7 answers

How do I migrate a model out of one django app and into a new one?

I have a django app with four models in it. I realize now that one of these models should be in a separate app. I do have south installed for migrations, but I don't think this is something it can handle automatically. How can I migrate one of the…
Apreche
  • 30,042
  • 8
  • 41
  • 52
130
votes
8 answers

How to convert SQLite SQL dump file to PostgreSQL?

For development I'm using SQLite database with production in PostgreSQL. I updated my local database with data and need to transfer a specific table to the production database. Running sqlite database .dump > /the/path/to/sqlite-dumpfile.sql, SQLite…
DevX
  • 1,714
  • 2
  • 14
  • 17
129
votes
5 answers

Removing a model in rails (reverse of "rails g model Title...")

rails g model Rating user_id:integer message:string value:integer How can I completely remove this model? Thanks
Colbern
  • 1,291
  • 2
  • 9
  • 3
129
votes
4 answers

Rails has_and_belongs_to_many migration

I have two models restaurant and user that I want to perform a has_and_belongs_to_many relationship. I have already gone into the model files and added the has_and_belongs_to_many :restaurants and has_and_belongs_to_many :users I assume at this…
128
votes
13 answers

Warning about `$HTTP_RAW_POST_DATA` being deprecated

I switched to PHP 5.6.0 and now I get the following warning everywhere: Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1'…
rr-
  • 14,303
  • 6
  • 45
  • 67
126
votes
7 answers

Rails migration for has_and_belongs_to_many join table

How do I do a script/generate migration to create a join table for a has_and_belongs_to_many relationship? The application runs on Rails 2.3.2, but I also have Rails 3.0.3 installed.
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
121
votes
13 answers

Java error: Comparison method violates its general contract

I saw many questions about this, and tried to solve the problem, but after one hour of googling and a lots of trial & error, I still can't fix it. I hope some of you catch the problem. This is what I get: java.lang.IllegalArgumentException:…
Lakatos Gyula
  • 3,949
  • 7
  • 35
  • 56
120
votes
9 answers

How to migrate/convert from SVN to Mercurial (hg) on windows

I'm looking for a tool to migrate a couple of SVN repositories to Mercurial, with history, labels and so on. I'm using TortoiseHg (Windows x32), so ConvertExtensions are discarded. There's some info on how to do this process on a Linux box (hgsvn),…
David Lay
  • 2,956
  • 4
  • 27
  • 48
119
votes
5 answers

Assigning default value while creating migration file

rails generate migration AddRetweetsCountToTweet retweets_count:integer Ok I use above line to create migration file that automatically generates code in the generated file to add a column to a model Tweet with datatype integer. Now I want to add…
kxhitiz
  • 1,909
  • 4
  • 19
  • 25
119
votes
12 answers

Want to upgrade project from Angular v5 to Angular v6

As Angular 6 is here, I want to upgrade or move my angular 5 client application to angular 6, but I'm not getting any tutorial or anything which can guide me through. According to me I just need to run a new Angular CLI and then have to move my…
Abhishek Chokra
  • 1,381
  • 2
  • 9
  • 17
109
votes
24 answers

Could not load file or assembly 'Microsoft.Build.Framework'(VS 2017)

When I try running the command "update-database", I get this exception: Specify the '-Verbose' flag to view the SQL statements being applied to the target database. System.IO.FileNotFoundException: Could not load file or assembly…
Oleksii Vorochenko
  • 1,226
  • 3
  • 9
  • 10
104
votes
8 answers

Loading initial data with Django 1.7+ and data migrations

I recently switched from Django 1.6 to 1.7, and I began using migrations (I never used South). Before 1.7, I used to load initial data with a fixture/initial_data.json file, which was loaded with the python manage.py syncdb command (when creating…
Mickaël
  • 3,763
  • 5
  • 26
  • 32