search for: schema_info

Displaying 20 results from an estimated 58 matches for "schema_info".

2006 Jan 19
3
problems with migrations in sql server
...lf.up create_table "Foo" do |t| t.column "Name", :string, :limit => 50 end end def self.down drop_table "Foo" end end When I run rake migrate the database doesn''t get updated. My new table doesn''t show up and my schema_info version doesn''t get updated. I have a couple questions: 1) Why would the schema_info table be created multiple times (at least attempted?). 2) Why isn''t an error be shown after I run rake migrate if the migration is failing? Where can I look for more details? 3) Does anyone hav...
2006 Mar 08
3
migrations schema_info table, Rails Recipes Bug?
I have the rails recipes book and i was going through the migrations recipe. Everything seemed to work except for the last part in trying to do a rake migrate with a migration file version 1 and the schema_info version set to 0. Without the force attribute, the rake migration fails, as expected. So the recipe says to run this: ruby script/runner ''ActiveRecord::Base.connection.execute("INSERT INTO schema_info (version) VALUES(1)")'' with an INSERT function. however, it said...
2006 Aug 08
6
rake migrate the first time - uses more than schema_info?
All, I have two migration files, file 1 and file 2. For reasons that I don''t want to go into unless I must, I want to only run file 2 on my production database (file 1 contains a bunch of table creation stuff for already existing tables). I figured if I created a schema_info table and set the version in it to 1, then I could just run rake db:migrate RAILS_ENV=production and just file 2 would get run. However, it keeps trying to run file1 and fails because as I said, those things already exist. Basically, it is ignoring or not seeing the schema_info version. I am...
2006 Aug 01
10
Migration DB Question
Just going through ''agile web development with rails'' 2nd ed. I accidentally created an empty migration source file with the wrong name, ruby script/generate migration add_test_date and then straight after that created the one I wanted to use ruby script/generate migration add_test_data and populated the second one - when I ran rake db:migrate a few times it did not seem
2007 Mar 08
3
Problem loading data from database
...to load some data from DB. I''m using Rails 1.2.2 on Fedora Core 6 and Sybase adapter. This worked fine when application run under Rails 1.1.6 but now I''m migrating to 1.2.2 and have some problems. At browser I got: SQL Command for table_structure for tplib_bckps failed Message: schema_info not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output). And in the log file: Setting row count to (0) SQL Command failed! ** SybSQLContext Server Message: ** Message number 208 Severity 16 State 1 Line 1 Server SYBDESA Proc...
2007 Jul 09
1
Issue with version field in schema_info
...n successfully. Which puts my database ''state'' at migration 007_xxx. Now when I add a migration (008_xxx) and re-run ''rake db:migrate'' I got an error saying the table being create in migration 001_xxx already exists. When I checked the table "select * from schema_info" there was nothing in the table. Inserting the proper version number by hand and re-running my migrate worked and migration 008 worked. All ''rake db:migrate'' being run from here update the table successfully. I can re-create this 100% of the time. Comments? -- Posted via...
2007 Sep 26
0
Fwd: error with schema_info when doing multiple migrations
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 <kevwil at gmail.com> Date: Sep 23, 2007 10:26 AM Subject: error with schema_info when doing multiple migrations To: sequel-talk at googlegroups.com 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...
2008 Apr 23
2
Table Unknown - SCHEMA_INFO
...t.string :location t.timestamps end end def self.down drop_table :reports end end When I attempt to migrate this (rake db:migrate), I get the following error: FireRuby::FireRubyException: Error preparing a SQL statement. Dynamic SQL Error SQL error code = -204 Table unknown SCHEMA_INFO At line 1, column 21. Undefined name SQL Code = -204 Firebird Code = 335544569 : SELECT version FROM schema_info I''ve tried running it with --trace, and going through the trace, but I can''t make any sense out of why this is happening. I''ve also obviously tried googling,...
2006 May 25
1
schema_info not updated
Hi, When doing a ''rake migrate'', schema_info is not updated (it does not contain any row). Migration is done properly the first time, but fails the second time I run it, since there is no info in schema_info. I am running rails 1.1.2, using script/generate migration to generate the migration file. Any help? Thank you. Jean-Etienne http:...
2007 May 21
0
Migrations : change schema_info table name ?
Hi, my company uses only 1 database for all the developments, so it is a big problem for using migrations in Rails because of the schema_info table. How can I solve this problem? Is there a way to change the schema_info table name? Thanks. Nicolas. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rai...
2005 Dec 23
1
Better way to import initial migration?
On a rails app that I''m developing I converted a regular old .sql file into a rails migration. Since I generated the migration in my development environment, it created the schema_info table for me. However, when I updated my production environment and tried running rake migrate it complained that schema_info doesn''t exist. Is there a rake task for getting around this yet, or some other elegant solution? So far it seems I have to manually create the schema_info table...
2006 Apr 20
4
Newbee rake migrate question
...local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/local/bin/rake:18 from terminal and [4;36;1mSQL (0.031305) [0;1mCREATE TABLE schema_info (version int(11)) [4;35;1mSQL (0.004014) INSERT INTO schema_info (version) VALUES(0) [4;36;1mSQL (0.000000) [0;1mMysql::Error: Table ''schema_info'' already exists: CREATE TABLE schema_info (version int(11)) [4;36;1mSQL (0.000000) [0;1mMysql::Error: Table ''schem...
2006 Jul 06
1
migrations work from script/console, but not command line
Having a weird issue where I can migration to version 1, but then go no further, and cannot go back to 0 -- but only from the command line. If I open up script/console I can do migrations just fine - down to 0 or up to 2, via ActiveRecord::Migrator. So I know the migrations must be valid, and I can verify that tables are created or destroyed in the database. Does anyone have any idea why this
2006 Apr 20
0
Migrations that don''t affect schema_info.version?
Hi, I am wondering whether it is possible to write and use migrations that do not change the schema_info.version. I would like to use the migration syntax to do certain tasks that don''t affect the schema like populating tables with sample data during development. Ingo -- Posted via http://www.ruby-forum.com/.
2006 Sep 06
1
Need to override database.yml settings for Capistrano run
...rver adapter in ODBC mode I have a Capistrano deploy script which fails when I run against my production DB. Apparently, this is the because the user that is set up for production has "guest" privileges in my SQL Server database and when Capistrano runs, instead of looking at the dbo.schema_info table (which has the correct version # - yes I know this begs the question how did that schema_info table get the correct version #), the user creates it''s own schema_info table, which of course, gets a default version of 0 and the migration attempts to start from there. I need 1 of 2...
2006 Jun 18
1
Problem using "rake db:migrate"
...to use same database say "testdb". For "app1", I create 3 models which in turn create 3 migration files with prefix, 001_, 002_ & 003_. Now I execute "rake db:migrate" so that 3 tables corresponding to 3 models will get created in database "testdb" & schema_info table will have version = 3. So far, so good. Now, from "app2" I want to create a new table, for which I create a new model, which creates a migration file with prefix "001_"(as this is version 1 for app2). In this file, I write a code to create a table say "table1"...
2006 Mar 28
7
Rails 1.1 and "freeze_gems"
I''m on OS X Tiger, and just upgraded my gems. I also ran ''rake rails:update''. After that, I ran "rake freeze_gems", I recieve the following: ===================== Freezing to the gems for Rails 1.1.0 rm -rf vendor/rails mkdir -p vendor/rails cd vendor/rails Unpacked gem: ''activesupport-1.3.0'' mv activesupport-1.3.0 activesupport Unpacked
2006 Apr 05
16
Migration won''t rollback to specific version?
...igration 001 through 006 in turn and update the database. I''ve tried running "rake migrate" again, thinking it would bring everything up to date, but it seems the only migration it ran was 007, which failed because the relevant table doesn''t exist. I even deleted the schema_info table, thinking that Rails would re-create and start at migration 001, but it behaved the same way. What am I missing? Is this the correct behavior and I''m doing something wrong? Fortunately this was on my development database where all I lost was some test data. Thanks, Jeff -- P...
2006 Apr 17
1
migration issue
...and I have a development system at home where I created all the new code and migrations. I committed my changes via svn and used ''svn update'' to update the live system. I started by running the migration on the development system to make sure it worked and it did...It went from schema_info 1 to 3 and the new tables and data is there. I am trying to update the production system and it doesn''t change (even though schema_info is at value 1 in production db. $ rake db:migrate environment=production --trace (in /home/craig/th-db) ** Invoke db:migrate (first_time) ** Invoke envi...
2007 Mar 21
2
ORA-03106: fatal two-task communication protocol error
...ORA-03106: fatal two-task communication protocol error: select lower(table_name) from user_tables # Note that all is fine in native sqlplus sqlplus ''mcd/XXX'' SQL> select lower(table_name) from user_tables; LOWER(TABLE_NAME) ------------------------------ structures schema_info SQL> desc structures Name Null? Type ----------------------------------------- -------- ---------------------------- ID NOT NULL NUMBER(38) AMW NUMBER G...