On 11/08/2011 04:29 AM, jzigmund(a)redhat.com wrote:
From: Jozef Zigmund<jzigmund(a)redhat.com>
---
...142739_remove_url_add_xml_to_catalog_entries.rb | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
create mode 100644
src/db/migrate/20111102142739_remove_url_add_xml_to_catalog_entries.rb
diff --git a/src/db/migrate/20111102142739_remove_url_add_xml_to_catalog_entries.rb
b/src/db/migrate/20111102142739_remove_url_add_xml_to_catalog_entries.rb
new file mode 100644
index 0000000..05998c8
--- /dev/null
+++ b/src/db/migrate/20111102142739_remove_url_add_xml_to_catalog_entries.rb
@@ -0,0 +1,13 @@
+class RemoveUrlAddXmlToCatalogEntries< ActiveRecord::Migration
+ def self.up
+ remove_column :catalog_entries, :url
+ add_column :catalog_entries, :xml, :text
+ add_column :catalog_entries, :xml_filename, :string
+ end
+
+ def self.down
+ remove_column :catalog_entries, :xml
+ remove_column :catalog_entries, :xml_filename
+ add_column :catalog_entries, :url, :string
+ end
+end
I think we should delete any existing catalog entries as part of this
migration. Any existing ones will be invalid now that they've been
stripped of their only useful data (the old URL).