Migrating data from one DBMS to another one can be tricky business.
Here’s a nice way to migrate data from an SQLite3 file to a MySQL database using taps. Well, the nice way is actually well documented here: Taps for Easy Database Transfers.
So this post is actually about working around a simple problem: SQLite doesn’t have a scope for decimal columns, but MySQL does. When taps rebuilds the database schema in MySQL it simply assumes those decimal columns had scope 0, which makes them integer columns. The data migration will thus result in rounded values in all those columns!
And here’s how you can workaround this problem for Ruby On Rails projects. Replace the all-uppercase placeholders with your info.
# Start the taps server on the original SQLite DB
taps server sqlite://DATABASE_FILE 'TAP_USER' 'TAP_PW'
# Create the database as per database.yml, assuming proper privileges
# Manually load the schema
# Pull the data, but skip the schema and don't copy the schema_migrations table
taps pull -e schema_migrations -s 'mysql://USER:PW@localhost/DATABASE' http://TAP_USER:TAP_PW@localhost:5000
Be aware that taps uses the default encoding for it’s MySQL connections, so you might have to set something like this in your ~/.my.cnf
After a long time with no “modern” Linux Kernel available in Debian or Ubuntu for usage as Xen Dom0, the “Big Bang” release has been uploaded to Debian unstable. This actually means all the hardware support etc. from Kernel 2.6.32 AND Xen a simple ‘apt-get install’ away. Maybe we can even get Ubuntu Karmic DomUs running…
When you can’t login using SSH after installing Voyage Linux on a CF Card, this might come from extracting the voyage-XXX.tar.bz2 not as root. This results in some /dev/ nodes not being created.
Simplest solution: re-extract as root and run installation again.
cpio failes to update
If you’re getting the following error after apt-get update/upgrade from Debian Etch:
Unpacking replacement cpio …
Replaced by files in installed package tar …
dpkg: error processing /var/cache/apt/archives/cpio_2.6-18.1+etch1_i386.deb (–unpack):
unable to create `./usr/share/locale/da/LC_MESSAGES/cpio.mo’: No such file or directory
dpkg-deb: subprocess paste killed by signal (Broken pipe)
KDE needs a relicensing! While I’m not happy that the release of the GPL3 made such an effort necessary… But now it’s important to handle it fast and correct. Please give your feedback to techbase or use SVN:
svn co svn+ssh://$firstname.lastname@example.org/home/kde/trunk/KDE/kdesdk/scripts
vi scripts/relicensecheck.pl & add your name to all the four lists (that is if you agree to all four options)
svn ci scripts -m “I agree to a relicense”
As Tom Alberssays:
“Really, it’s not more than a minute of work for you.”