Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails (PostgreSQL?) implicit sequence/index warning [duplicate]

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...

like image 322
Meltemi Avatar asked Dec 06 '22 12:12

Meltemi


2 Answers

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
like image 119
Brandan Avatar answered Dec 11 '22 08:12

Brandan


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

like image 21
aquinas Avatar answered Dec 11 '22 08:12

aquinas