Obviously you are right that migrations is great, and there should be a discussion on whether the generator migration facility included is sufficient. But I think the Data perspective is very useful for those who need to get a quick gander at the data structure, for example, or to confirm that something has just been written to the database successfully, etc.

Victor Kane
http://awebfactory.com.ar

On 3/22/06, Steven Ross < [EMAIL PROTECTED]> wrote:
sorry i cut and pasted code down should say drop_table :some_table


On 3/22/06, Steven Ross < [EMAIL PROTECTED] > wrote:
heh, this is exactly why i love migrations:

ruby script/generate migration my first migration


class MyFirstMigration< ActiveRecord::Migration
  def self.up
    create_table :some_table do |t|
      t.column :first_name, :string
      t.column :last_name, :string
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end
   
  end

  def self.down
    drop_table :shirt_sizes
  end
end

rake migrate

violia! want to go back a version? rake migrate VERSION=# (0 for first)


On 3/22/06, Victor Kane < [EMAIL PROTECTED]> wrote:
Perhaps the screen shots of the use I have put to the Data Perspective in one of my tutorials can lend you a helping hand:

http://wiki.awebfactory.com.ar/awebfactory/published/DepotAppWithRadRailsIterationD1
On 3/22/06, Rob Gordon <[EMAIL PROTECTED]> wrote:
Yes, I can connect to mysql database using cmd line
mysql. All is there as expected.  My database.yml
works fine in a non-radrails environment.

I exported an existing workspace for whats its worth.

On 3/21/06, Vipul Bhatt < [EMAIL PROTECTED]> wrote:
Make sure your operating system's PATH variable points to your
database program.

I assume you actually have a database created by some means outside
RadRails, and that your database.yml includes all the correct info.
If it helps, mine looks like this:

development:
   adapter: mysql
   database: myproj_development
   username: vipul
   password: ********
   host: localhost
   port: 3306

It works fine in Windows 2K, RadRails 0.6.

Vipul


Rob Gordon wrote:
> I am following the directions offered from the RadRails help system
> ("Help" selection in menubar) and I am puzzled by what I am being asked
> to do to connect to a database.
>
> I am trying to connect to a database defined in database.yml from within
> a RadRails project.
>
> I am by Help to "Switch to Data Perspective. Select your project and expand
> the tree. Double-click on the database you want to browse."
>
> I don't see any databases listed. In the screenshot accompanying the Help
> text, is shows the contents of the database.yml file displayed, with a line
> highlighted.
>
> I am given impression that "double-click on database" means clicking within
> database.yml . This does not work?
>
> What am I missing? How do I connect to db from within RadRails?
>
> When I try to run query, a dialog appears that says "Which database
> should I connect to?
> Please select the desired database in the navigator on the left and try
> again."  Per above,
> I see no database to select.
>
> THanks in advance.
>
> Rob
>
>
>
> _______________________________________________
> RadRails mailing list
> RadRails@radrails.org
> http://lists.radrails.org/mailman/listinfo/radrails
>
>



--
Rob Gordon

_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails




_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails





--
Steven Ross
web application & interface developer
http://www.zerium.com
[phone] 404-488-4364



--
Steven Ross
web application & interface developer
http://www.zerium.com
[phone] 404-488-4364

_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails



_______________________________________________
RadRails mailing list
RadRails@radrails.org
http://lists.radrails.org/mailman/listinfo/radrails

Reply via email to