4

Possible Duplicate:
NOTICES for sequence after running migration in rails on postgresql Application

Using PostgreSQL for development & test databases (as well as production). When I rake db:test:prepare my PostgreSQL theapp_test database I get these messages for each table:

NOTICE:  CREATE TABLE will create implicit sequence "events_id_seq" for serial column "events.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "events_pkey" for table "events"
NOTICE:  CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
...

I do not get these notices with rake db:migrate on theapp_development. And I haven't noticed them in production. What does it mean and should I work to get rid of them?

FYI - This didn't occur in the past when I have used MySQL (or SQLite3 for that matter) for testing...

Community
  • 1
  • 1
Meltemi
  • 37,979
  • 50
  • 195
  • 293

2 Answers2

11

You can silence these messages by adding (or uncommenting) a line in config/database.yml:

# config/database.yml
development:
  adapter: postgresql
  min_messages: WARNING  # this line silences those NOTICE messages
Brandan
  • 14,735
  • 3
  • 56
  • 71
4

No. That's just Postgres being awesome and automatically creating stuff for you that you actually want. It's not a warning it's just an FYI

aquinas
  • 23,318
  • 5
  • 58
  • 81
  • 1
    It really is a drag to not have a PK automatically indexed .. I'd say "doing what it should" (or "doing what I expect SQL Server to do" ;-) vs "awesome" .. pgsql is just more verbose about the matter. –  Aug 22 '12 at 02:09
  • +1 for pointing out is a *NOTICE* (aka "info") and not a warning .. –  Aug 22 '12 at 02:10