Skip to content

Commit

Permalink
Better detection of legacy database for 0.x to 1.0 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Mar 21, 2011
1 parent 9efa182 commit e5b3a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bricks/zena/zena/migrate/03_zerox1_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def execute(*args)
class Zerox1Data < ActiveRecord::Migration
extend Zena::Acts::Secure
def self.up
if connection.tables.include?('contact_contents')
if connection.tables.include?('contact_contents') && ContactContent.first
# Need to migrate data
if $Zerox1SchemaRunning
raise "\n\n=> This is not an error:\n=> Please restart migration: a restart is needed before running Zerox1Data.\n\n"
Expand Down

0 comments on commit e5b3a4c

Please sign in to comment.