Yes, this is the key issue on migrations: independent of DB engine.
As to completely avoid the programmer using SQL: this is true when we're
talking about DDL (Data Definition Language), i.e., when we define the
structure, but you can still use 'raw' SQL when doing DML (Data Manipulation
On Wed, Mar 9, 2011 at 1:24 PM, Jose Bonnet jose.bon...@gmail.com wrote:
Yes, this is the key issue on migrations: independent of DB engine.
Yeah, and the coolest thing is you become fearless of schema changes :)
(assuming you also write good test coverage). Really, it is so easy to
change and
Please, don't forget that the migrations are also provide u a pure
ruby DSL to operate over your DB structure. It means that they are
also independent from the DB driver (oracle or mysql or postgres).
--
Thanks, Ivan Povalyukhin
On Mar 2, 2:18 pm, David Kahn d...@structuralartistry.com wrote:
On
JeffV wrote in post #910774:
My company expects some tables to exceed 2^31-1 rows and so we are
thinking we need a 64 bit PK. Has anyone gotten this to work?
Thanks, Jeff
I have created a preliminary version of a railtie that changes
activerecord to use UUIDs, however only sqlite3 is tested
My company expects some tables to exceed 2^31-1 rows and so we are
thinking we need a 64 bit PK. Has anyone gotten this to work?
Thanks, Jeff
On May 5, 5:10 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
[Please quote when replying. This is a mailing list, not just a Web
forum.]
Helen Poon wrote:
My problem is very similar. I want to use id as primary key. But the
default data type of integer is too small, I would like the id field to
be able to hold a Java long (ie BIGINT in mysql, sqlserver and DB2).
There is no way that I can supply :limit to the id field?
[Please quote when replying. This is a mailing list, not just a Web
forum.]
demonGeek wrote:
Because I want to.
That's not a sufficient answer. If you need a feature, be prepared to
explain how it adds value for you. If you can't explain how something
adds value, you probably don't
On Apr 1, 1:48 pm, Max Williams li...@ruby-forum.com wrote:
Ways around it i can think of ...
a) i make sure that my migrations don't use something from the codebase
which is going to be deleted in the future. This seems difficult if not
(conceptually at least) impossible. When you're
Frederick Cheung wrote:
Create private copies of the classes involved in the migration ie
class ChangeQuizzes ActiveRecord::Migration
class Quiz ActiveRecord::Base; end
...
end
obviously include only what behaviour the migration actually needs.
Fred
ah, now that's a good
On Mar 25, 4:21 am, bramu...@gmail.com bramu...@gmail.com wrote:
Hi All,
How to add the migrations for the MySQL views? any idea?? any gem
available? have any one created migrations for mysql views?? Please
let me know asap?? I am totally struck with this...
I don't believe there is
I just put this here since couldn't find it anywhere else on the net:
require action_controller/test_process
def self.up
...
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this
test
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
I get the following error, as previously reported for the Oracle adapter
a while ago. Seems that the select_rows method isn't implemented in the
adapter.
Please, can anyone point me in the right direction where to look or what
steps to take to get select_rows in the frontbase adapter
I would create a new database, load that table in the new database, and
create a view from your database used by rails to the new db you created.
That way you will only be recreating the view and not the whole table.
If you are dealing with indexes on the table, be sure to add the indexes
before
Thanks for the swift reply!
So the application will utilize two databases, one just for the
zipcodes table? How would I go about that? Know of any decent
references for something like this?
On Nov 13, 1:50 pm, Darian Shimy dsh...@gmail.com wrote:
I would create a new database, load that
See if the following will help:
# Create two databases in the same server
create database zipcode;
create database rails;
# Create the zipcode table in the zipcode database
use zipcode;
create table zipdata...;
# Switch over to the rails app database and create the view
use rails;
create or
jrgoodner wrote:
Hey there, I'm not super familiar with MySQL, so please forgive me if
I say something stupid.
I have a large database table (it includes every zipcode in the U.S.,
along with its city,state,latitude,longitude), and it seems that we
are frequently
Paul Lynch wrote:
[...]
Migrations have a problem, though. After a while, the code changes to
a point where earlier migrations stop working.
[...]
Usually this is only a problem if a
few weeks have elapsed since the last update.
Have other people run into this issue? How are you working
I was actually talking about updating an existing production
database. In such a case, the migrations which would be run would be
just the ones between the previous release and the current one.
I have not tried your suggestion of rake db:schema:load but, judging
by the contents of schema.rb,
Paul Lynch wrote:
I was actually talking about updating an existing production
database. In such a case, the migrations which would be run would be
just the ones between the previous release and the current one.
This should not cause problems in most cases. You mentioned that some
of the
Thanks, Marnen, for mentioning seed_fu-- that is an intriguing plugin,
and I have been thinking about whether we could use it. I think we
have a situation in which it would not work well for us-- for at least
some of our tables.
As a concrete example, suppose you have a large table of product
Paul Lynch wrote:
[...]
As a concrete example, suppose you have a large table of product
information. If the table is large, loading it from a fixture (or
seed_fu file) could be slow, and anyway some of that information will
probably be edited through a separate administrative web
On Nov 13, 7:07 am, Clemens [EMAIL PROTECTED] wrote:
Is there a way to determine whether all migrations have been run?
ActiveRecord::Migrator.get_all_versions only returns the migrations
run (but not the ones not yet run).
just scanning throught the source,
On Fri, 2008-09-26 at 08:31 -0700, Jon wrote:
the VERSION value at in rake db:migrate VERSION=[versionNumber] is the
migration number right? for instance lets say I have 3 models
generated in this respective order albums, users, and reviews. If I
do rake db:migrate VERSION=0, it will delete
Craig,
Yeah that sounds more feasible rather than migrating down...I can definitely
confirm VERSION=0 will drop the table though because when try to load the
structure in the console it throws me an error.
What would be the syntax to just add a change(thus adding a new migration
then)
I want to
I'm sorry, it doesn't throw me an error, it says Review(Table doesn't exist)
On Fri, Sep 26, 2008 at 8:58 AM, Jon Liu [EMAIL PROTECTED] wrote:
Craig,
Yeah that sounds more feasible rather than migrating down...I can
definitely confirm VERSION=0 will drop the table though because when try to
On Fri, 2008-09-26 at 08:58 -0700, Jon Liu wrote:
Craig,
Yeah that sounds more feasible rather than migrating down...I can
definitely confirm VERSION=0 will drop the table though because when
try to load the structure in the console it throws me an error.
What would be the syntax to just
On Fri, 2008-09-26 at 09:33 -0700, Jon Liu wrote:
ok thanks, but how do you actually generate that particular migrations
file from the command line?, ie it would be 004_something
script/generate migration some_name_of_what_you_re_trying_to_accomplish
Craig
thanks craig,
I was able to generate the file w/the command and I added the add_column
code. When I do my migrate I can see rail iteratively compiling the files
and I see the
4 add_column(:reviews, :album_id, :integer)
-.2970s
4 AddAlbumIdToReviews: migrated (0.3120s)
which means that's it's
I'm just loading it like this:
Review
Review(id: integer, productReview:text, product: string, productCreator:
string, created_at: datetime, updated_at: datetime)
It's strange, I added an identical id to another structure called Album,
well I added review_id, and it worked out fine.
On Fri,
On Sep 27, 1:33 am, Jon Liu [EMAIL PROTECTED] wrote:
I'm just loading it like this:
Review
Review(id: integer, productReview:text, product: string, productCreator:
string, created_at: datetime, updated_at: datetime)
It's strange, I added an identical id to another structure called
you know that might be a good idea...
On Fri, Sep 26, 2008 at 10:37 AM, Erol Fornoles [EMAIL PROTECTED]wrote:
On Sep 27, 1:33 am, Jon Liu [EMAIL PROTECTED] wrote:
I'm just loading it like this:
Review
Review(id: integer, productReview:text, product: string, productCreator:
Craig,
It worked. Thank youplease excuse me while I go shoot myself for not
trying that already. It's funny restarting the console has worked in some
instances like this before...but I was lazy and did reload! instead.
Rails is funny...
Thanks again
Jon
On Fri, Sep 26, 2008 at 10:38 AM,
33 matches
Mail list logo