
attractive, usable web applications
Richard's Blog - Design, coding and life in Japan
Databases
A bash script to download your remote MySQL schema and load it locally
Submitted by Richard on Tue, 11/10/2009 - 16:46#!/bin/bash REMOTEUSER=username REMOTEPASS=password REMOTECOMPUTER=remotecomputer.com REMOTEMYSQLUSER=mysqllogin REMOTEMYSQLPASS=mysqlpass DB=database FILENAME=dbschema.sql LOCALMYSQLUSER=localuser LOCALMYSQLPASS=localpassword ssh -l "$REMOTEUSER" "$REMOTECOMPUTER" "mysqldump -u$REMOTEMYSQLUSER -p$REMOTE
{syntaxhighlighter brush: bash;gutter: false; fontsize: 100; first-line: 1; }#!/bin/bash REMOTEUSER=username REMOTEPASS=password REMOTECOMPUTER=remotecomputer.com REMOTEMYSQLUSER=mysqllogin REMOTEMYSQLPASS=mysqlpass DB=database FILENAME=dbschema.sql LOCALMYSQLUSER=localuser LOCALMYSQLPASS=localpassword ssh -l "$REMOTEUSER" "$REMOTECOMPUTER" "mysqldump -u$REMOTEMYSQLUSER -p$REMOTEMYS
Tags:
Using :include in Rails ActiveRecord call doesnt create a joins query
Submitted by Richard on Tue, 10/27/2009 - 20:37I am currently writing an Rails app that uses quite a few database calls. I wanted to cut these calls down so I knew I would need to use the :include option in ActiveRecord. I was expecting from what Ryan Bates mentioned in one of his RailsCasts that a nice join would be created for me in one query.
Tags:
SQLite3::SQLException: SQL logic error or missing database:
Submitted by Richard on Wed, 10/21/2009 - 10:07I found the following error in one of my unit tests
SQLite3::SQLException: SQL logic error or missing database:
I had a quick look on google and found the following blog post
Tags:
Recent Blog Posts
- Doctrine 2 and why you should use it! 29th Jul 10, 15:23
- How to localize your main blog listing page using Drupal 26th Jun 10, 11:46
- Creating Rails like template helpers in Django 24th Jun 10, 22:01
- Error: No module named messagesdjango.contrib.contenttypes 22nd Jun 10, 22:00
- Creating multiple blocks easily in a Drupal module pt2 8th Jun 10, 14:12