database-migration

Invalid literal for int() error in ForeignKey default

扶醉桌前 提交于 2019-12-11 12:31:40
问题 My models.py : class orientation_type(models.Model): nome = models.CharField(max_length=16, unique=True) def __str__(self): return self.nome class region(models.Model): nome = models.CharField(max_length=16, unique=True) def __str__(self): return self.nome class province(models.Model): city = models.OneToOneField(community, blank= True, null=True) orientation = models.ForeignKey(orientation_type, default='generic') region = models.ForeignKey(region, default='north') In my first migration (so

Migrate data from original User model to Custom User model in django 1.8

喜欢而已 提交于 2019-12-11 12:12:35
问题 I am created a custom user model. There were already have users in the auth database. So, I using the data migration to migrate the data to my custom user model. This is how I did the data migration in the auto migration file (which I found from here): UPDATED from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('userauth', '0002_auto_20150721_0605'), ] operations = [ migrations.RunSQL('INSERT INTO userauth

Lotus Notes to Oracle database migration [closed]

拈花ヽ惹草 提交于 2019-12-11 11:36:32
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I have a NSF file of a lotus database. The objective is to give up the legacy lotus notes database and migrate it to relational database oracle. Do any one have expertise in this area to give a step wise process to carry out migration from lotus notes to oracle db. 回答1: 10 years

Specifying flywayUrl through system property in SBT

偶尔善良 提交于 2019-12-11 10:47:30
问题 Using Flyway with sbt how can the flywayUrl be specified through system properties ( -D ) instead of via build.sbt ? I want to run the migrations via command line, specifying all parameters (driver, url, user, password) without defining them in build.sbt . The plugin documentation page seems to indicate that this should be possible: Overriding order System properties > Plugin configuration I've tried running it like this: sbt -Dflyway.url=jdbc:h2:file:target/foobar -Dflyway.user=SA

Import backed-up SQL Anywhere 10 .db file into MySQL 5.1

江枫思渺然 提交于 2019-12-11 08:49:18
问题 I have a backup of a database from a week ago. I need to import this into MySQL without access to the original database server. Despite my boss's knowledge that I am nowhere near a database administrator; how do I do this? 回答1: No one will provide an answer because (a) it is illegal, and (b) it is against the website rules. If you have legal access to the database server: which means the first option is to get a licence for ASA, rather than using MySQL. It takes one single command to load the

Rails migration complains about undefined method `attachment' using paperclip

馋奶兔 提交于 2019-12-11 08:37:53
问题 Lemmie just preface this by saying I'm fairly new to Rails. Our app uses paperclip (3.2.4) to manage attachments and as usual, I generated a migration that looks something like: class AddAttachmentPhotoToPhpfoxUsers < ActiveRecord::Migration def self.up change_table :phpfox_user do |t| t.attachment :photo end end def self.down drop_attached_file :phpfox_user, :photo end end (It's called phpfox_user because we have to build on top of a legacy db) That's all great, works fine. However, we have

How to automatically upgrade deployed database for end-users

☆樱花仙子☆ 提交于 2019-12-11 07:55:05
问题 I've read a fair number of questions on how to upgrade a database for developer and such, and I'm leaning towards using migratordotnet or something similar, however it seems the the upgrades need to be run with something like MSBuild or NAnt. These are not things I should expect an end-user to have installed. Ideally the process should be the user installs the new version of the app, launches it and it takes care of everything behind the scene. Depending on how long the process takes I may or

Database Migration from one version to another using Liquibase

百般思念 提交于 2019-12-11 07:49:05
问题 I rolled out the first version of application and a Postgres server is set up for the same. I am planning to roll out my second version of my application which has structural changes in my tables. For example : I had App table with a column called version , now I have another column called releaseVersion and I have to apply alter to add this column.In such a case, how can I use liquibase to generate/apply the migration script? Is liquibase capable of such migration .? In short, for my first

Migration From Tokumx 1.5 To Percona Server For mongodb 3.11

爱⌒轻易说出口 提交于 2019-12-11 07:37:03
问题 Migrating Data from Tokumx To Percona Server For MonoDB Step 1 : This guide describes how to upgrade existing Percona TokuMX instance to Percona Server for MongoDB. The following JavaScript files are required to perform the upgrade: • allDbStats.js • tokumx_dump_indexes.js • psmdb_restore_indexes.js You can download those files from GitHub. Step 2 : Run the allDbStats.js script to record database state before migration: $ mongo ./allDbStats.js > ~/allDbStats.before.out Step 3 : Perform a dump

Laravel environment config not loading, migration fails - SQLSTATE[HY000] [2002] No such file or directory

陌路散爱 提交于 2019-12-11 07:03:49
问题 My app/config/database.php has been setup like this: 'mysql' => array( 'driver' => 'mysql', 'host' => getenv('DB_HOST'), 'database' => getenv('DB_NAME'), 'username' => getenv('DB_USER'), 'password' => getenv('DB_PASS'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ), I have updated my env detection code like this in bootstrap/start.php : $env = $app->detectEnvironment(function() { return file_exists(dirname(__FILE__) . '/../.env.production.php') ? 'production' :