Posted by jcfiala

(If you missed it, my previous post on this topic was Using Doctrine Migrations Without the ORM.)

So my previous blog post laid down a good start on how to use Doctrine to move changes to the database, but soon I ran into a new problem - what about when you have data to change in addition to changing the structure of the database? For instance, my first try at this was putting a default row of data into a new table, or maybe putting initial data into a new column?

My first try was simple, but unfortunately not quite right, I used the addSql() command:

class Version20140828145153 extends AbstractMigration
    public function
up(Schema $schema) {
code that creates a new table>
$this->addSql("INSERT INTO <table> (this, that, theother) VALUES (...)");

Posted by jcfiala

Recently I was handed a PHP project at work which already existed but the owner wanted a variety of tweaks and improvements added to it. The project wasn't built with any framework I could name, and although it has a sort of MVC feel to it, is not strictly an MVC project.

Posted by jcfiala

It's been a while since I've remembered to blog... oh, well. Parenting is distracting.

This weekend's been fun. Yesterday we went out to see things - first we went by the Cherry Creek Farmer's Market, where we picked up some interesting pie and ravioli, and also found a really cute dress for Rose. We also got some neat snacks, nibbling on some Pirogi and Chinese dumplings.

Once we were done with that, we wandered off to the Valverde Bazaar, which was near enough to where we lived. Lots of interesting antiques, scrap, and various bits of art - my wife got a garden decoration made from sticking together various sunny plates and glass dishes, and I picked up four dark red scrabble tiles that spell out R-O-S-E... as well as looked over some really nifty typewriters. For some reason, I really like the idea of getting a nice looking typewriter.

Posted by jcfiala

An interesting weekend for gaming. This weekend is Tacticon/Railcon, the big train gaming event, so my wife went off to play and left me with Rose for two days. Which has been fun, but I'm already worn out. (The first day was Friday, so today she's spending time at home.)

With Rose both tired and a handful, I wasn't really able to visit the dealer's room at the convention when we dropped by yesterday, but I did pause momentarily at the table that Black & Read had to pick up the latest expansion for Netrunner. (I've been picking up the expansions, but haven't really had a chance to play. I probably should try playing online, but haven't been motivated to yet.)

Posted by jcfiala

My mother's in from out of town visiting, and we've been having a lot of fun. One of the most satisfactory things we've done together is what we did on Thursday, going to the first full day of the "Just Between Friends" consignment sale here in Denver. (If you're a parent, these things are magic - cheap used items (or cheap unused items) all in one place.)

Posted by jcfiala

Yeah, this is amusing.

Several folks in my livejournal feed post the same picture of the front of Orwell's house with a security camera mounted outside. Naturally, I immediately search online for the string "orwell camera hoax" and get many hits - as I expected. Here's a good one:

It's a fake, ha ha. Of course, I can't comment on this without either having my comment marked as spam or having to sign up to yet another blogging service, so I'll just slip it into my friends feed and hope folks aren't so open minded they miss it. :)

Why do people believe photos on the internet?

Posted by jcfiala

So, I'm currently working on a book-related project where I'm processing a bunch of book data, and for some reason the isbn13 values are missing, where the isbn10 values are still there.

So, I went out and found this useful mysql function for converting the values:

Posted by jcfiala

So, I'm setting up a solr server (version 4.1), using Tomcat6, for development. Not a problem, until I try including the DataImportHandler, where everything just breaks.

If you're not familiar with the DataImportHandler, you should have a look. It's a very nice looking piece of code that helps you import data into Solr easily, keeping track of changed data and all. I'm looking forward to using it for a project which doesn't use the usual apache solr Drupal modules.

Alright, so the problem had to do with including the jar files, which for me means including solr-dataimporthandler-4.1.0.jar. The obvious way from looking at the solrconfig.xml is <lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" />. Looking at my setup, I saw that the solrconfig.xml was two directories below the directory containing dist, so I shortened the dir path to ../../dist/, and it failed. And it kept failing.

Posted by jcfiala

The problem I was handled at work was pretty simple - we're putting together a multi-language site, with English and Spanish data. However, if you search on something that's part of a proper name which shows on both English and Spanish data, then you were getting a mix of English and Spanish nodes. What we wanted was a way to automatically filter the search by the current language, something that I couldn't find anywhere. So, I rolled up my sleeves and created this:

s3fs Notes

22 Feb 2013
Posted by jcfiala

These may not be useful to anyone else, but who knows.

If you're getting the error "s3fs: could not determine how to establish security credentials", make sure the password file is named passwd-s3fs, and not password-s3fs.

If you're getting the error "s3fs: unable to access MOUNTPOINT No such file or directory", try setting the mountpoint directory to 777.

These are what solved my problems today, at least!