Posting to merb list in case it is a merb problem. (?!??)

The error still happens with sequel 0.2.1.

---------- Forwarded message ----------
From: Kevin Williams <[EMAIL PROTECTED]>
Date: Sep 23, 2007 10:26 AM
Subject: error with schema_info when doing multiple migrations
To: [EMAIL PROTECTED]


I tried to post an issue to the project site but it kept giving me 500
server error messages.

What steps will reproduce the problem?
0. install merb trunk gem and merb_sequel plugin trunk gem
1. create a merb trunk app
2. put the attached files in the appropriate places
3. run sequel:db:migrate

What is the expected output? What do you see instead?
I expected to see a "completed successfully" message.

I got:

rake aborted!
table schema_info already exists

My two tables were created, but schema_info has no records in it.

What version of the product are you using? On what operating system?
0.2.0.2 gem on Mac OS X 10.4.10

Please provide any additional information below.
It seems to error on updating the version after the migrations were completed.


--
Cheers,

Kevin Williams
http://kevwil.com/
http://www.almostserio.us/
http://kevwil.jaiku.com/



-- 
Cheers,

Kevin Williams
http://kevwil.com/
http://www.almostserio.us/
http://kevwil.jaiku.com/

Attachment: database.yml
Description: Binary data

puts "Loading dependencies..."

# Make the app's "gems" directory a place where gems are loaded from
Gem.clear_paths
Gem.path.unshift(MERB_ROOT / "gems")

# Make the app's "lib" directory a place where ruby files get "require"d from
$LOAD_PATH.unshift(MERB_ROOT / "lib")

### Uncomment for Sequel ORM
dependency "merb_sequel"

### Uncomment for ActiveRecord ORM
# dependency "merb_active_record"

### Add your other dependencies here

# dependencies "activerecord", "merb-form-helpers"
# OR
# dependency "activerecord", "> 1.2.3"
# OR
# dependencies "activerecord" => "> 1.2.3", "hpricot" => "= 0.5"

Merb::Server.after_app_loads do
  ### Add dependencies here that must load after the application loads:

  # dependency "magic_admin" # this gem uses the app's model classes
end
class A < Sequel::Model(:a)
  set_schema do
    primary_key :id
    varchar :name
  end
end
class B < Sequel::Model(:b)
  set_schema do
    primary_key :id
    varchar :name
  end
end
require File.join( MERB_ROOT, "app/models", "a" )

class CreateATable < Sequel::Migration
  def up
    A.create_table unless A.table_exists?
  end

  def down
    A.drop_table if A.table_exists?
  end
end
require File.join( MERB_ROOT, "app/models", "b" )

class CreateBTable < Sequel::Migration
  def up
    B.create_table unless B.table_exists?
  end

  def down
    B.drop_table if B.table_exists?
  end
end
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to