similar to: Migrations with multi-column indexes

Displaying 20 results from an estimated 1000 matches similar to: "Migrations with multi-column indexes"

2006 Apr 17
7
MySQL backticks and column names
The upgrade to Rails 1.1 hurt my ability to run tests because it generated the following MySQL error: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''key ON config (key)'' at line 1: CREATE UNIQUE INDEX key ON config (key) I have a table called `config` with a column
2006 Jan 19
3
problems with migrations in sql server
Is anyone using migrations with a SQL Server database who might be able to lend me a hand? I''ve used migrations with MySql in the past and haven''t run into any issues so forgive When I run rake migrate nothing is actually getting updated in my database. I created a migration using ./script/generate migration AddFooTable and updated the migration to look as follows: class
2015 Apr 09
2
[LLVMdev] BNF for IL/IR interpreter
This might be a very beginner question, but I'm looking for an example for something that I have never done. Suppose that I wanted to express actions with respect to lifted semantics of CPU instructions to an intermediate representation, BAP IL or LLVM IR. How might I go about providing a Backus Naur Form specification and then dynamically interpreting those lifted instructions by also
2006 Dec 20
1
Problem with Oracle function-based indexes in Rails
Hello, We''re using Rails on an Oracle database. If we define an index like the following, we end up with problems during the "db:schema:dump" rake target. add_index "emcolumn", ["upper(name)"], :name => "ind_emcolumn_uname" The created schema.rb file contains: add_index "emcolumn", ["sys_nc00013$"], :name =>
2005 Nov 24
1
Log question
development.log contains quite a few SELECTS on system tables like COLUMNS. Wouldn''t it be more efficient to cache this info? I''m also wondering about strings like "[4;35;1m". What''s their purpose and is it possible to get rid of them? They look like screen coordinates and makes no sense in a text file. Christer Processing ReportController#create (for
2007 Nov 14
6
a few add_index questions..
on previous apps i hadn''t really worried much about adding foreign key indexes on my tables just because they''ve been fairly small and i didn''t really think i needed them. well, i''m working on something now that has the potential to have a lot more data, and a lot more foreign keys. so i have 3 tables... users, projects, and tasks.. should i be using add_index
2006 Apr 02
2
rails db indexing and through association
Hello, Say, I have a pictures table, and there are many objects which can have pictures, so I define a picturable type. Now, to make the query for pictures more efficient I should index the picture table using both picturable_type and picturable_id. Is this the correct approach to indexing the table, or can things be done better? I want the database retrieval operation to be extremely fast (I
2006 Mar 19
3
Can''t add data during migration if column is called "type"
Hi I''m new to Rails. This is my first application and I''m trying to set up a schema I''ve hand-crafted as a migration. Does anybody know why this... # deposit_types create_table :deposit_types do |table| table.column :type_code, :string, :limit => 20, :null => false table.column :description, :string, :limit => 50, :null => false
2006 Jul 04
3
OCIError: ORA-00918: column ambiguously defined
Hi all, when I execute the command "rake db:schema:dump" i get this error in the db/schema.rb file. ____________________________________________________ # Could not dump table "region" because of following ActiveRecord::StatementInvalid # OCIError: ORA-00918: column ambiguously defined: SELECT lower(i.index_name) as index_name, i.uniqueness, lowe r(c.column_name) as
2005 Dec 30
9
SELECT MAX
How does one do a SELECT MAX query in rails? I''ve searched and searched and tried lots of things with no luck. I want to implement "SELECT MAX(column_name) from table_name and have it return the maximum value from column_name. I just need to get that one value, not the whole object... Thanks for any ideas... Shelby _______________________________________________ Rails mailing
2009 Jul 31
1
scale subsets of grouped data in data frame
Hello, I'm trying to duplicate what's an easy process in RapidMiner. In RM, we can simply use two operators: subgroup iteration attribute value selection (Can use a regex for the attrribute name.) I can do this in R with a lot of code and manual steps. It would be really nice to find a more automated way. My data looks like this group group_height group_weight height
2008 Feb 10
4
method from string?
I am sure this is doable but I can''t find a specific example and my brain is frazzled. Basically, I am doing a whole load of in-place editing and need methods to support the updates. Here is what I am doing now: def set_blog_website faq = Faq.find(params[:id]) faq.blog_website = params[:value] faq.save! @faq = faq do_ret end Surely there is a generic way I can
2010 Aug 22
1
rails3: t.index in migrations not working anymore
Hello, I''m playing around with Rails3 and trying to upgrade one of my applications to Rails 3.0.0.rc and I get an error which should be still working. Migration: t.index :name When I execute rake: rake aborted! An error has occurred, all later migrations canceled: undefined method `index'' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x4b2b6b0> Does some one
2006 Jul 30
1
Doubt on composite index
The AWDwR book has the following: add_index :categories_products, [:product_id, :category_id] add_index :categories_products, :category_id The first, composite index actually serves two purposes: it creates an index which can be searched on both foreign key columns, and with most databases it also creates an index that enables fast lookup by the product id. The second index then completes
2006 Feb 07
5
OCI adapter slowdown on dictionary access
Hi, after some experience with Rails on MySQL databases I gave it a try on one of our larger Oracle database. I was facing a problem when Rails tried to detect the columns for a model/table. The appropriate statement ran about 1 min which led to a timeout. Our Oracle guru told me to analyze the SYSTEM schema. After that hadn''t helped, he said the only remaining chance is to use a
2011 Jun 24
1
Installation of bigmemory fails
Hello All, I tried to intall the bigmemory package from a CRAN mirror site and received the following output while installing. Any idea what's going on and how to fix it? The system details are provided below. --------------------- begin error messages ----------------------- * installing *source* package 'bigmemory' ... checking for Sun Studio compiler...no checking for
2006 Oct 21
2
object(s) are masked from package - what does it mean?
Hi, Sometime when I attach a dataset, R gives me the following message/warning:"The following object(s) are masked from package:datasets: column_name". Does anyone know what it means? Since it seems that the dataset was attached and I could manipulate the data from the dataset without problems, I am wondering what was R trying to tell me. Thanks, Tom [[alternative HTML version
2006 Jul 03
9
Migrations from Mysql to Oracle. PLS HELP!
Hi all, I''m using Rails/Mysql as development platform. the production server is under Rails/Oracle. Right now, i''m trying to install my application under the production server, the connection to orcale is fine via Rails, but i have a weird problem. example : here is a extract from my db scheme : Table User :_____________ id_user | first_name |
2010 Mar 30
2
remove_index missed quote_table_name
in lib/active_record/connection_adapters/abstract/schema_statements.rb there is a missing quote_table_name in line 286 (def remove_index): execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{table_name}" so my "keys" table can get an index with "add_index" but can''t remove it (without tweaking) replacing it to execute
2013 Jul 23
1
Postgres adapter misconfigured on Linux?
I''ve written a simple Rails migration that adds an index to an existing Postgres table: class AddIndexToEvents < ActiveRecord::Migration > def change > add_index :sf_events, :account_id > end > end However, when I run the migration, it fails due to a syntax error on the CREATE INDEX line. I''m expecting some SQL like this to be generated: CREATE INDEX