[NUUG fiksgatami] New fixmystreet database layout break Norwegian site
Petter Reinholdtsen
pere at hungry.com
Tue Apr 19 14:05:51 CEST 2011
[Matthew Somerville]
> Hi Petter,
>
> When we deploy our site, it checks that the database matches the
> contents of the db/schema.sql file; if not, it errors, so that we
> can't deploy a site that's not up-to-date with respect to the
> schema.
Sound like a nice system. I just do 'git pull', and suspect it will
take a while before we are close to getting a deployment system in
place.
> In this instance, you need to add the three columns recently added to
> schema.sql:
> + -- External information
> + external_id text,
> + external_body text,
> + external_team text,
OK. I have done this in SQL to fix it, and dropped my workaround patch.
ALTER TABLE problem ADD external_id text, ADD external_body text,
ADD external_team text;
> We will probably need to look at better schema updating in future
> for things like this - thankfully, the move to Catalyst will help
> with that, and sorry for inconvenience in the mean time.
I will just have to be careful to remember to check for schema changes
before updating the code. It is to catch these issues I got the
staging server fiksgatami-dev.nuug.no, so if I do it right, it should
never affect the production site. This time I did it wrong (did not
test enough), and it made it to the production site before I
discovered it. :) But only for a few minutes last evening.
Happy hacking,
--
Petter Reinholdtsen
More information about the fiksgatami
mailing list