data-migration

Is it worth using sqlalchemy-migrate ? [closed]

十年热恋 提交于 2019-12-03 05:25:45
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I have a web application using sqlalchemy (within Pylons). I need to effiently change the schema to be able to change the production version at least on a daily basis, maybe more, without losing the data. I have played a little bit with sqlalchemy-migrate over the week-end

Is there a Ruby database migration gem, that helps you move content from an old structure to a new structure?

老子叫甜甜 提交于 2019-12-03 02:42:27
Are there any Ruby gems/libraries that help you migrate from an old DB structure to a new structure? ActiveRecord migrations do a good job keeping track of a new db structure, but I wonder if there's something that helps you migrate an entire legacy db to a new structure: transfer_from(:source_table => 'person', :destination_table => 'dudes_and_dudets') do from :name, :to => :full_name from :dob, :to => :age do |dob| # this would, for example, load the result (Date.today - dob)/60/60/24/365 # of the block into :age end end (I realize you could do these transforms just as easily with AR, but I

Is it worth using sqlalchemy-migrate ? [closed]

二次信任 提交于 2019-12-02 18:43:46
I have a web application using sqlalchemy (within Pylons). I need to effiently change the schema to be able to change the production version at least on a daily basis, maybe more, without losing the data. I have played a little bit with sqlalchemy-migrate over the week-end and I would say that it gave me a bad impression. First I think it cannot help with migration between two databases engines ; that's something that could probably be done with sqlalchemy alone. Second the docs do not seem up to date. I had to change some command-line options, like giving the repository path at each command,

Completely copying a postgres table with SQL

耗尽温柔 提交于 2019-12-02 17:14:11
DISCLAIMER: This question is similar to the stack overflow question here , but none of those answers work for my problem, as I will explain later. I'm trying to copy a large table (~40M rows, 100+ columns) in postgres where a lot of the columns are indexed. Currently I use this bit of SQL: CREATE TABLE <tablename>_copy (LIKE <tablename> INCLUDING ALL); INSERT INTO <tablename>_copy SELECT * FROM <tablename>; This method has two issues: It adds the indices before data ingest, so it will take much longer than creating the table without indices and then indexing after copying all of the data. This

What is the best way to migrate data in django

て烟熏妆下的殇ゞ 提交于 2019-12-02 15:12:21
After making some changes in my models (eg. new field in a model and a new model) what is the best way of reflecting these changes to my populated database? PS: I wanted to see many solutions in one place rated. Apparently more solutions are already listed here . Farinha I've asked a similar question here and got quite a few answers. There are quite a lot of ways of doing it, like manually doing the dumping and reloading with SQL, using fixtures or using one of the "emerging" schema-evolution packages for Django: Django Evolution South dmigrations (there's a DjangoCon video of a panel on

What would be the best method to migrate Oracle database to MS Access using Java?

喜你入骨 提交于 2019-12-02 14:07:58
问题 This might be a very basic question, but I could use some help with this from the experts here at StackOverflow. I am just brainstorming and weighing all the options available. So, I do not need help with the code, please. But, some suggestions or ideas would help. Here's what I thought might work: Making a d/b connection to Oracle using JDBC Running SQL statements to fetch data from Oracle Storing the data obtained in a data-structure Making a d/b connection to MS Access using the JDBC-ODBC

Apache Solr index upgrade from 4.7 to 5.2

穿精又带淫゛_ 提交于 2019-12-02 09:34:27
We are looking to upgrade from Apache Solr 4.7 to ApacheSolr 5.2. upgraded server and run script to upgrade the data index. it is showing below errors. ./upgradeindex.sh -t 5 /home/solr Target version is 5 Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/4.10.4/lucene-backward-codecs-4.10.4.jar curl: (7) couldn't connect to host Downloading http://central.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/5.5.4/lucene-backward-codecs-5.5.4.jar curl: (7) couldn't connect to host Downloading http://central.maven.org/maven2/org/apache/lucene/lucene

Split table into two tables with foreign keys

佐手、 提交于 2019-12-02 02:59:10
I have one table: drupal.comments , with amongst others, the columns: cid: primary key uid: foreign key to users table, optional name: varchar, optional email: varchar, optional The description says: UID is optional, if 0, comment made by anonymous; in that case the name/email is set. I want to split this out into two tables rails.comments and rails.users , where there is always a user: id: primary key users_id: foreign key, always set. So, for each drupal.comment, I need to create either a new user from the drupal.comments.name/drupal.comments.email and a rails.comment where the rails.comment

Transfer binary data (image etc) in a CSV file

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 22:09:48
问题 I have some binary data to transfer in addition to some other metadata information stored as string, number etc. The binary data I have is image files stored as a blob column in the database, I want to include the blob column in the csv file and store the csv file in filesystem or sftp server, I guess it does not matter where it is stored. How can the binary data be stored as another column in the csv file? Is this a good practice to transfer the binary data this way? 回答1: Base64 The usual

What is common data migration strategy for Core Data in iOS development?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 18:54:21
If data model changes,and need be backward compatible to use old data source,we must consider data migration for database application. What is the common strategy for core data in iOS dev ? Is there any mature open source project to handle this problem ? 来源: https://stackoverflow.com/questions/4601339/what-is-common-data-migration-strategy-for-core-data-in-ios-development