Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #5826 (new defect)

Opened 2 years ago

Last modified 11 months ago

[PATCH] for PostgreSQL schema DROP issue

Reported by: Manuel Holtgrewe <purestorm@ggnore.net> Assigned to: bitsweat
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: 1.1.1
Severity: normal Keywords: postgresql drop table cascade
Cc: tarmo

Description

Currently, the DROP TABLE used for dropping tables via a schema or migration files does not work since it does not add a CASCADE after the DROP command and tables depend on

The attached patch fixes this.

Attachments

drop_cascade.diff (0.6 kB) - added by Manuel Holtgrewe <purestorm@ggnore.net> on 08/19/06 19:14:16.

Change History

08/19/06 19:14:16 changed by Manuel Holtgrewe <purestorm@ggnore.net>

  • attachment drop_cascade.diff added.

08/19/06 19:16:47 changed by Manuel Holtgrewe <purestorm@ggnore.net>

  • summary changed from [PATCH] MSIE & image submit tag workaround to [PATCH] for PostgreSQL schema DROP issue.

The text above should have read:

Currently, the DROP TABLE used for dropping tables via a schema or migration files does not work since it does not add a CASCADE after the DROP command and tables depend on indexes and views. The CASCADE also drops those.

The attached patch fixes this.

01/12/07 15:43:20 changed by bitsweat

  • keywords set to postgresql drop table cascade.
  • owner changed from David to bitsweat.
  • milestone set to 1.x.

You lose all dependencies, such as foreign key constraints from other tables, so I'm not sure cascade-by-default is a good idea.

08/28/07 01:23:28 changed by tarmo

  • cc set to tarmo.

#5818 is for the same issue but does not suggest fixing the issue with CASCADE.