Created
November 25, 2008 19:20
-
-
Save cschneid/29043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pa_development=# \d materials_resource_menus | |
Table "public.materials_resource_menus" | |
Column | Type | Modifiers | |
------------------+-----------------------------+----------------------------------------------------------------------- | |
id | integer | not null default nextval('materials_resource_menus_id_seq'::regclass) | |
material_id | integer | | |
resource_menu_id | integer | | |
created_at | timestamp without time zone | | |
updated_at | timestamp without time zone | | |
Indexes: | |
"materials_resource_menus_pkey" PRIMARY KEY, btree (id) | |
pa_development=# select * from materials_resource_menus; | |
id | material_id | resource_menu_id | created_at | updated_at | |
----+-------------+------------------+----------------------------+---------------------------- | |
1 | 1 | 1 | 2008-11-19 22:54:40.297442 | 2008-11-19 22:54:40.297442 | |
(1 row) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub.save! | |
SQL (0.2ms) BEGIN | |
SQL (0.5ms) INSERT INTO "resource_menus" ("updated_at", "title", "type", "sort_type", "is_active", "description", "created_at") VALUES('2008-11-25 19:12:30.534107', NULL, E'ResourceSubmenu', NULL, NULL, NULL, '2008-11-25 19:11:45.632038') RETURNING "id" | |
SQL (0.0ms) PGError: ERROR: duplicate key value violates unique constraint "materials_resource_menus_pkey" | |
: INSERT INTO "materials_resource_menus" ("updated_at", "material_id", "resource_menu_id", "id", "created_at") VALUES ('2008-11-19 22:54:40.297442', 1, 4, 1, '2008-11-19 22:54:40.297442') RETURNING "id" | |
SQL (0.2ms) ROLLBACK | |
ActiveRecord::StatementInvalid: PGError: ERROR: duplicate key value violates unique constraint "materials_resource_menus_pkey" | |
: INSERT INTO "materials_resource_menus" ("updated_at", "material_id", "resource_menu_id", "id", "created_at") VALUES ('2008-11-19 22:54:40.297442', 1, 4, 1, '2008-11-19 22:54:40.297442') RETURNING "id" | |
from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment