The following 2 migrations failed for me on sqlite, so I fixed them.
These patches have been tested on postgres and sqlite, but not mysql. If
they work there too, great, but making one more db work for now seems
worthwhile to me. If you have mysql setup and would like to give this a
go, great, but I woudl like to push this asap to at least get sqlite
functional again.
-j
[PATCH conductor 1/2] Fix this migration so it also works on sqlite.
[PATCH conductor 2/2] Change sql statement to use rails helpers.
Show replies by date
While sqlite is not the ideal db to run conductor on, we
should attempt to at least keep it mostly usable for web app
development. Updated this migration with same fix markmc applied
months ago to another like this with patch a8d0f73693859b63d9831da607d9bdc6093b9afb
---
...amed_suggested_deployable_to_catalog_entries.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git
a/src/db/migrate/20110816192727_renamed_suggested_deployable_to_catalog_entries.rb
b/src/db/migrate/20110816192727_renamed_suggested_deployable_to_catalog_entries.rb
index db94244..9e4c7b6 100644
--- a/src/db/migrate/20110816192727_renamed_suggested_deployable_to_catalog_entries.rb
+++ b/src/db/migrate/20110816192727_renamed_suggested_deployable_to_catalog_entries.rb
@@ -19,7 +19,8 @@
class RenamedSuggestedDeployableToCatalogEntries < ActiveRecord::Migration
def self.up
rename_table :suggested_deployables, :catalog_entries
- add_column :catalog_entries, :catalog_id, :integer, :null => false
+ add_column :catalog_entries, :catalog_id, :integer
+ change_column :catalog_entries, :catalog_id, :integer, :null => false
end
def self.down
--
1.7.6.4
This cause migration to fail on sqlite, due to syntax
differences between RDBMSs.
---
...1102125644_alter_metadata_object_value_limit.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/db/migrate/20111102125644_alter_metadata_object_value_limit.rb
b/src/db/migrate/20111102125644_alter_metadata_object_value_limit.rb
index 70015a3..bdbd20b 100644
--- a/src/db/migrate/20111102125644_alter_metadata_object_value_limit.rb
+++ b/src/db/migrate/20111102125644_alter_metadata_object_value_limit.rb
@@ -1,6 +1,6 @@
class AlterMetadataObjectValueLimit < ActiveRecord::Migration
def self.up
- execute "ALTER TABLE metadata_objects ALTER COLUMN value TYPE
varchar(510)"
+ change_column :metadata_objects, :value, :text
end
def self.down
--
1.7.6.4