views:

20

answers:

0

I've been using mysql forever. never really needed anything fancier. But I'm using heroku a lot and while I'm working, I like free search, so I'm using the acts_as_tsearch plugin. If you go to the git repository, it tells you:

---begin paste--- * Preparing your PostgreSQL database

Add a text search configuration 'default':

CREATE TEXT SEARCH CONFIGURATION public.default ( COPY = pg_catalog.english ) ---end paste---

So guess what? I

  1. changed from mysql to postgresql in my rails config
  2. ran that "CREATE TEXT" code in the sql pain of pgAdmin (a gui for postgres)
  3. noticed that now my development DB has something called an "FTS configuration"
  4. tried the search functionality and it works GREAT

But I'm having trouble getting that configuration to show up in the schema. When I did rake db:dump it doesn't make it in there. I know I can add this line to the schema.rb:

execute 'CREATE TEXT SEARCH CONFIGURATION public.default ( COPY = pg_catalog.english )'

and that works, but how can I get that configuration into the schema without my having to hand-add it? Can I create a file that is also loaded after schema.rb when someone types rake db:load?

And for the postgres people, a question: What does that CREATE TEXT SEARCH CONFIGURATION... do?