Permalink
Browse files

Fix incomplete migrations (v1.4.1)

* Need to namespace models for existing projects
* Switch to sqlite for testing
  • Loading branch information...
1 parent 52e677e commit ada14d1bcae9a3db706ff8bf257adeb5f730593c @peakpg peakpg committed Jul 16, 2012
View
@@ -1,7 +1,6 @@
coverage/**/*
.DS_Store
tmp/**/*
-db/*.sqlite3
*.gem
.dotest
tmp/restart.txt
@@ -10,3 +9,4 @@ test/dummy/.sass-cache
test/dummy/tmp/*
test/dummy/log/*
test/dummy/db/schema.rb
+test/dummy/db/*.sqlite3
View
@@ -8,8 +8,8 @@ gemspec
gem "thin"
# Gem Environments
-group :development do
- gem "mysql"
+group :development, :test do
+ gem "sqlite3"
gem "mocha"
end
View
@@ -1,48 +1,48 @@
PATH
remote: .
specs:
- bcms_news (1.4.0)
+ bcms_news (1.4.1)
browsercms (>= 3.5.0.rc2, < 3.6.0)
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.2.3)
- actionpack (= 3.2.3)
+ actionmailer (3.2.6)
+ actionpack (= 3.2.6)
mail (~> 2.4.4)
- actionpack (3.2.3)
- activemodel (= 3.2.3)
- activesupport (= 3.2.3)
+ actionpack (3.2.6)
+ activemodel (= 3.2.6)
+ activesupport (= 3.2.6)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.1.2)
- activemodel (3.2.3)
- activesupport (= 3.2.3)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.6)
+ activesupport (= 3.2.6)
builder (~> 3.0.0)
- activerecord (3.2.3)
- activemodel (= 3.2.3)
- activesupport (= 3.2.3)
+ activerecord (3.2.6)
+ activemodel (= 3.2.6)
+ activesupport (= 3.2.6)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.3)
- activemodel (= 3.2.3)
- activesupport (= 3.2.3)
- activesupport (3.2.3)
+ activeresource (3.2.6)
+ activemodel (= 3.2.6)
+ activesupport (= 3.2.6)
+ activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
ancestry (1.2.5)
activerecord (>= 2.2.2)
arel (3.0.2)
- browsercms (3.5.0.rc2)
+ browsercms (3.5.2)
ancestry (~> 1.2.4)
ckeditor_rails (~> 3.6.2.2)
jquery-rails (~> 2.0)
paperclip (~> 3.0.3)
- rails (~> 3.2.0)
+ rails (>= 3.2.5, < 3.3.0)
sass-rails
term-ansicolor
builder (3.0.0)
@@ -55,7 +55,7 @@ GEM
eventmachine (0.12.10)
hike (1.2.1)
i18n (0.6.0)
- journey (1.0.3)
+ journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
@@ -65,11 +65,10 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.1)
- mime-types (1.18)
+ mime-types (1.19)
mocha (0.11.4)
metaclass (~> 0.0.1)
- multi_json (1.3.5)
- mysql (2.8.1)
+ multi_json (1.3.6)
paperclip (3.0.4)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
@@ -84,25 +83,25 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.2.3)
- actionmailer (= 3.2.3)
- actionpack (= 3.2.3)
- activerecord (= 3.2.3)
- activeresource (= 3.2.3)
- activesupport (= 3.2.3)
+ rails (3.2.6)
+ actionmailer (= 3.2.6)
+ actionpack (= 3.2.6)
+ activerecord (= 3.2.6)
+ activeresource (= 3.2.6)
+ activesupport (= 3.2.6)
bundler (~> 1.0)
- railties (= 3.2.3)
- railties (3.2.3)
- actionpack (= 3.2.3)
- activesupport (= 3.2.3)
+ railties (= 3.2.6)
+ railties (3.2.6)
+ actionpack (= 3.2.6)
+ activesupport (= 3.2.6)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.6)
+ thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
- sass (3.1.18)
+ sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
@@ -111,12 +110,13 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.6)
term-ansicolor (1.0.7)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
- thor (0.14.6)
+ thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
polyglot
@@ -129,5 +129,5 @@ PLATFORMS
DEPENDENCIES
bcms_news!
mocha
- mysql
+ sqlite3
thin
View
@@ -6,7 +6,6 @@ Gem::Specification.new do |s|
s.name = "bcms_news"
s.version = BcmsNews::VERSION
- s.files = Dir["{app,config,db,lib}/**/*"]
s.authors = ["BrowserMedia"]
s.date = %q{2011-12-29}
s.description = %q{The News Module for BrowserCMS}
@@ -15,10 +14,8 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = [
"README.markdown"
]
- s.files += Dir["app/**/*"]
- s.files += Dir["config/**/*"]
- s.files += Dir["db/**/*"]
- s.files += Dir["lib/**/*"]
+
+ s.files = Dir["{app,config,db,lib}/**/*"]
s.files += Dir["Gemfile", "LICENSE.txt", "COPYRIGHT.txt", "GPL.txt" ]
s.test_files += Dir["test/**/*"]
@@ -1,13 +0,0 @@
-# Upgrade to BcmsNew v1.3.0
-class BcmsNews130 < ActiveRecord::Migration
- def change
- # These need to be done since v1.2 had a different table name
- rename_table :news_articles, :bcms_news_news_articles
- rename_table :news_article_versions, :bcms_news_news_article_versions
-
- # This is needed to match new BrowserCMS 3.4 naming convention for versioning column.
- if column_exists? :bcms_news_news_article_versions, :news_article_id
- rename_column :bcms_news_news_article_versions, :news_article_id, :original_record_id
- end
- end
-end
@@ -0,0 +1,8 @@
+require 'cms/upgrades/v3_5_0'
+
+# If your project has a migration named 'bcms_news_130.rb', you should delete it. This migration is a 'miore complete' version of that.
+class BcmsNewsV141 < ActiveRecord::Migration
+ def change
+ v3_5_0_apply_namespace_to_block("BcmsNews", "NewsArticle")
+ end
+end
View
@@ -1,3 +1,3 @@
module BcmsNews
- VERSION = "1.4.0"
+ VERSION = "1.4.1"
end
@@ -15,25 +15,10 @@
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
- adapter: mysql
- encoding: utf8
- reconnect: false
- database: bcms_news_development
- pool: 5
- username: root
- password:
- socket: /tmp/mysql.sock
+ adapter: sqlite3
+ database: db/bcms_news_development.sqlite3
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
test:
- adapter: mysql
- encoding: utf8
- reconnect: false
- database: bcms_news_test
- pool: 5
- username: root
- password:
- socket: /tmp/mysql.sock
+ adapter: sqlite3
+ database: db/bcms_news_test.sqlite3
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120521153604) do
+ActiveRecord::Schema.define(:version => 20120716200957) do
create_table "bcms_news_news_article_versions", :force => true do |t|
t.integer "original_record_id"
@@ -285,32 +285,32 @@
t.integer "original_record_id"
t.integer "version"
t.string "name"
- t.text "content", :limit => 16777215
- t.boolean "published", :default => false
- t.boolean "deleted", :default => false
- t.boolean "archived", :default => false
+ t.string "content", :limit => 65537
+ t.boolean "published", :default => false
+ t.boolean "deleted", :default => false
+ t.boolean "archived", :default => false
t.string "version_comment"
t.integer "created_by_id"
t.integer "updated_by_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "html_block_versions", ["original_record_id"], :name => "index_html_block_versions_on_original_record_id"
add_index "html_block_versions", ["version"], :name => "index_html_block_versions_on_version"
create_table "html_blocks", :force => true do |t|
t.integer "version"
- t.integer "lock_version", :default => 0
+ t.integer "lock_version", :default => 0
t.string "name"
- t.text "content", :limit => 16777215
- t.boolean "published", :default => false
- t.boolean "deleted", :default => false
- t.boolean "archived", :default => false
+ t.string "content", :limit => 65537
+ t.boolean "published", :default => false
+ t.boolean "deleted", :default => false
+ t.boolean "archived", :default => false
t.integer "created_by_id"
t.integer "updated_by_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "html_blocks", ["deleted"], :name => "index_html_blocks_on_deleted"

0 comments on commit ada14d1

Please sign in to comment.