I've got a table with five columns, one of which is the primary key. This primary key is using a non-standard name, like nearly all tables in that database. I've added a migration to rename the other four columns in that table. The problem is after running that migration, the primary key constraint is gone! I've done that renaming thing ...
I'm trying to migrate some models ImageFields to using the S3BotoStorage storage backend from django-storages. As part of this process I've changed my Model's ImageField declaration to include the storage=instance_of_s3botostorage argument, and new instances of my Model that save an image to the ImageField attribute now get stored in S...
Like many other developers out there, I've created iPhone projects that use a UITabBarController as the root controller, with the tab views using UINavigationControllers to drill down from lists to detail views. And like many other developers out there, I need to migrate these apps to the iPad so they take advantage of the bigger screen ...
I am trying to judge the work involved in migrating our website from Coldfusion to .NET. At this stage all we want to do is create an exact replica so scope creep should hopefully be avoidable.
Does anyone have any suggestions for judging the volume of work required?
...
Hello,
I'm starting to think about some kind of deployment script. So, sometimes we need to ALTER our tables in release etc. I need some kind of tool to compare DB structure on dev and production (or just previous version), find out difference in table's structures and generate appropriate ALTER's.
It will also be great if this tool w...
It looks like string is limited to 256 characters and text is usually 65536 characters.
I tried
ruby script/generate migration change_description_to_text description:text
but the up and down in the migration file generated are both empty? Is there a way to generate this migration automatically?
If added manually using a remove_colu...
Hi all,
I'm in the process of doing a large scale server migration, as such I have to move 50+ SQL 2005 databases to a new SQL 2008 server installation.
The DB guys have only given me a backup of each database, so I have a directory with some 50 .bak files sitting in a directory (ie c:\db) that I need to restore.
I need to restore ea...
I'm writing my migration SQL against tests. Because the migration is the last one and we've got about 300 migrations, it's DAMN SLOW to get there, as it migrates from bottom up every time. Any ideas how to speed this up a bit?
...
How do I add a default value to an existing field in a RoR migration?
...
Hello,
We are planning a migration of an Oracle installation from Solaris to Linux. At the same time we will upgrade to latest version of Oracle. There are a few hundred stored procedures that should be migrated as well.
Present version is Oracle SE 9.2. We will still use Oracle SE, potentially with RAC.
Is there anything that we mu...
We are migrating a project from classic Asp.Net web forms to Asp.Net MVC.
I have followed the fours steps outlined here
http://www.codeproject.com/KB/aspnet/webformmvcharmony.aspx
and all is working well.
Now I want to get Visual Studio to include MVC item templates in the "add new item" dialog. So I add {F85E285D-A4E0-4152-9332-AB1...
We are occasionally in a position to take over PHP based projects, but as we are a Java-house we are searching for ways to turn a PHP-project (or codebase) into a Java-project.
The approaches we came up to work in a mixed Java/PHP context are :
PHP in frontend and Java in backend with separate front (PHP+JavaScript) and back (Java+SQL...
I have an old PHP application with a bunch of MySQL tables. I want to rewrite it with Rails(3) and want to import the old data. How can I write a migration-script to import the MySQL-Dump into a sqlite DB?
...
So, very soon, I will be part of a migration that will move a home-rolled persistence layer (circa any good, popular ORM) to hibernate3. However, at the same time that this migration happens, developers will be working to implement new business logic atop the current persistence layer, hence working against the migration! Does anyone hav...
I'm using Symfony 1.4 with Doctrine.
Here's my initial schema:
Page:
tableName: page
columns:
ref:
type: string(50)
notnull: true
unique: true
I'd like to remove the index on the ref column using migrations.
So the schema becomes:
Page:
tableName: page
columns:
ref:
type: string(50)
notn...
I'm trying to work around Oracle's inability to change the type of a column with data in it. I cache the attribute's correct value, set it to nil, rename the column and then attempt to re-set the attribute:
class SwitchToForeignKeys < ActiveRecord::Migration
def self.up
registration_countries = {}
Registration.all.each do |r|
...
I'm having some issues with altering a table in the migrations of doctrine 2. Following code always throws the error: Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getAlterTableSQL' is not supported by platform.
This is strange as alter table is supported by sqlite.
public function up(Schema $schema)
{
$user = $schema->getTa...
Hi all,
I want to drop a foreign key in a doctrine 2 migration.
But there is no dropForeignKeyConstraint()
Does anybody know how to drop it?
...
Hi all,
I have a question about database migrations files.
Do you think they should only contain database structure changes? Or is it okay to have data inside them as well? What's the best practices?
Personally I think database migrations files get ugly by putting data inside them.
...
I'm currently trying to convince management of the need to port one of our applications to .NET. The application has grown to be a bit of a monster in Access (backend in SQL), with 700 linked tables, 650 forms/subforms, 130 modules and 850 queries.
I pretty much know all the major benefits of doing this, but now need to look at how this...