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:

* Preparing your PostgreSQL database

Add a text search configuration 'default':

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

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?

1 Answer 1

1

Why don't you try adding it to a migration file and rake that against the heroku db?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.