# Postgres migration notices

**URL:** <https://www.ruby-forum.com/t/postgres-migration-notices/98376>\
**Category:** Rails\
**Created:** [July 14, 2006, 9:12am UTC](https://www.ruby-forum.com/t/postgres-migration-notices/98376 "2006-07-14T09:12:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 14, 2006, 9:12am UTC](https://www.ruby-forum.com/t/postgres-migration-notices/98376/1 "2006-07-14T09:12:41Z")

</div>

When I run “rake” using a postgres 8.1 database, I get a bunch of these  
notices.

NOTICE: CREATE TABLE will create implicit sequence  
“categories\_id\_seq” for serial column “categories.id”  
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index  
“categories\_pkey” for table “categories”

How can I avoid those? I take it I need to modify the migrations.

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 14, 2006, 4:59pm UTC](https://www.ruby-forum.com/t/postgres-migration-notices/98376/2 "2006-07-14T16:59:39Z")

</div>

On Fri, 2006-07-14 at 00:10 -0700, Joe Van D. wrote:

> When I run “rake” using a postgres 8.1 database, I get a bunch of these notices.
> 
> NOTICE: CREATE TABLE will create implicit sequence  
> “categories\_id\_seq” for serial column “categories.id”  
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index  
> “categories\_pkey” for table “categories”
> 
> How can I avoid those? I take it I need to modify the migrations.

* * *

funny, I always considered it a form of being loved.

The message is merely informational since what it is telling you is that  
it not only is creating an ‘id’ column in your postgresql table but also  
setting an explicit sequence for that table which will automatically  
increment the ‘id’ entries. Without this sequence, ActiveRecord could  
not manage adding new records to the table without some other form of  
programmer assistance.

There’s no problem, that is the way things are supposed to be

Craig

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 14, 2006, 6:11pm UTC](https://www.ruby-forum.com/t/postgres-migration-notices/98376/3 "2006-07-14T18:11:37Z")

</div>

On Jul 14, 2006, at 12:10 AM, Joe Van D. wrote:

> When I run “rake” using a postgres 8.1 database, I get a bunch of  
> these notices.
> 
> NOTICE: CREATE TABLE will create implicit sequence  
> “categories\_id\_seq” for serial column “categories.id”  
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index  
> “categories\_pkey” for table “categories”
> 
> How can I avoid those? I take it I need to modify the migrations.

For your app - config/database.yml  
development:  
adapter: postgresql  
min\_messages: warning

Globally - edit postgresql.conf  
client\_min\_messages = warning

jeremy

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [July 15, 2006, 12:47am UTC](https://www.ruby-forum.com/t/postgres-migration-notices/98376/4 "2006-07-15T00:47:40Z")

</div>

On Jul 14, 2006, at 2:10 , Joe Van D. wrote:

> How can I avoid those? I take it I need to modify the migrations.

They’re NOTICES, not ERRORs. They’re just there to let you know  
what’s going on. You can freely ignore them. If you really don’t want  
to log them, you can set log\_min\_messages to a higher threshold  
(ERROR or WARNING) in your migrations, or even in postgresql.conf to  
set it globally.

Here are some links to the PostgreSQL documentation for more details  
(note that I munged these links while offline, so they may not be  
exactly right, but hopefully they’ll point you in the right direction)

[http://www.postgresql.org/docs/current/interactive/runtime-config-](http://www.postgresql.org/docs/current/interactive/runtime-config-)  
logging.html#RUNTIME-CONFIG-LOGGING-WHEN

> **[SET](https://www.postgresql.org/docs/current/sql-set.html)**
>
> SET SET — change a run-time parameter Synopsis SET \[SESSION | LOCAL \] configuration\_parameter { TO | = } …

Michael G.  
grzm seespotcode net
