similar to: Postgres + tsearch2, migrations, and unit testing

Displaying 20 results from an estimated 1000 matches similar to: "Postgres + tsearch2, migrations, and unit testing"

2006 Oct 23
1
Postgres and Tsearch2, how do you do it?
Hi, How do you use Tsearch2 in Rails? Petr -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
2006 Apr 03
2
problems testing on 1.1 and postgresql
Hi, I get errors doing this: 1) createdb myapp_test 2) rake db:test:clone_structure 3) rake test:units rake aborted! PGError: ERROR: relation "matches" already exists I''m using the :sql schema format because there are some problems with postgres and the :ruby schema format config.active_record.schema_format = :sql It seems rake test:units is trying to create the tables
2008 Dec 05
0
test:clone_structure problems with Postgres
(in C:/projects/books/TheatreTickets) ** Invoke db:test:clone_structure (first_time) ** Invoke db:structure:dump (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:structure:dump ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute db:test:purge ** Execute db:test:clone_structure psql:db/development_structure.sql:15: ERROR: language
2006 Apr 15
0
active record and tsearch2, works?
I have a search form; I grab the value and use it in a fulltext query: :conditions => ["idxfti @@ ''" + search_string + "''::tsquery and ...........] Characters in search_string like "?", ":", bomb active record. I tried a single tick and "\" to escape those, but active record still bombs (same queries via psql work). Suggestions?
2008 Jun 05
23
unit test question
In development and production, I''ve got postgresql constraints that prevent deleting a CaseManager if there is a Client that belongs to that CaseManager. In unit tests...and obviously in my testing db, those restrictions don''t get added. Is it wrong to test for deleting dependent records in unit tests? Craig --~--~---------~--~----~------------~-------~--~----~ You received
2010 Mar 10
0
Postgres plpgsql is created by default in new version, but schema dump tries to create it
As of some recent version of Postgres, plpgsql is created for new databases by default, but the sql schema export (config.active_record.schema_format = :sql) expots a create command in development_structure.sql, resulting in an error. CREATE PROCEDURAL LANGUAGE plpgsql; I could not find the version this changed in, however it is noted here:
2006 May 28
1
Unit tests hitting development database, not testing...
I''ve been working through the AWDWR book (both hard copy first edition and "beta book" pdf of second and I''m running into some problems when running unit tests. Integration tests and functional tests are behaving correctly and are operating against the test database. However unit tests try to operate against the development database and fail. (ie rake test:unit
2002 May 15
0
language: bug or feature: vector-subscript of list (PR#1558)
Full_Name: Mark Bravington Version: R1.3.1 & R1.5.0 OS: Windows 2000 Submission from: (NULL) (140.79.2.3) R doesn't like the use of subscripts with length > 1, to get into recursive lists: > listio_ list( a=list( b=9, c='hello'), d=1:5) > listio[[ c( 1, 2)]] Error: attempt to select more than one element > S is more relaxed: test> listio_ list( a=list( b=9,
2006 Apr 28
1
Full-text Search Options Redux
Hey all, I haven''t heard much on the list in a while re: ActiveSearch, Ferret, Hyper Estraier, etc. in a while. Has anyone successfully used ActiveSearch on tables with rows in the order of hundreds of thousands, if not millions? (in our case, each row containing anywhere from a paragraph of text to many pages) Here''s some background on our search efforts. A. Hyper
2006 Oct 19
0
Migrations, superusers, security and least privileges
The one thing I don''t like about migrations is the security, and I''d like to know if anyone is interested in working with me to improve it (or knows an existing way to accomplish the same thing). Here''s the scenario: - I always create specific database users that only have CRUD priveleges, and run my web apps with these users - I need to log in with a
2005 Dec 27
4
Migrations & Unit Testing: Possible Bug in Rails?
I recently started using migrations to create the schema of a Rails project I am working on. The database I am using for this project is MySQL. The initial migration creates the table and also includes a number of execute statements (to do some things like setting primary keys, autoincrement on some columns and other messy voodoo). Running "rake migrate" creates the database with no
2007 Jun 25
0
db:test:clone_structure doesn''t purge db
I''m using a "CHARSET=utf8" option in my migrations, but this isn''t dumped to schema.rb - a file that test:db:clone uses to create the test database. The end result is some of my specs fail because they''re expecting the db table to be using utf8. to get round this, I switched to using db:test:clone_structure which DOES preserve the charset option, but when the
2005 Dec 23
2
no need for DB reflection when using config.active_record.schema_format = :ruby ?
Hi. I''ve not seen anything on this so thought I''d put forward the idea and see if it has any merit, or is already in practice. When using migrations with config.active_record.schema_format = :ruby (ruby as the canonical DB definition) it seems there would be no need to query the database itself to determine its structure; it would already be known. This might have some good
2006 Aug 23
1
problems with Oracle: FK, triggers
Hi All! Is anyone working with Oracle on Rails? What about testing? I will be very happy if you can help me: 1) When I run rake test:unit it removes all my sequences in test enviroment. And I get an error like "OCIError: ORA-02289: sequence does not exist" But when I run rake db:test:clone_structure I can see all sequences again. Where is a problem? 2) How I can take proper
2006 Apr 11
6
Oracle unit test problem in Rails 1.1.2/Ruby-OCI 0.1.14
I''ve upgraded to Rails 1.1.2, and I''m trying to push this change through to our build server (Linux/Oracle) and we are getting some errors in the unit tests using Oracle. Looking at the data in the tests reveals a precision problem. Looking at the tables tells the whole story. My development database contains this table: SQL> describe dls_grids; Name
2005 Mar 07
1
postgres unit testing in 0.10.1
http://dev.rubyonrails.com/changeset/856 looks to me like it''s not going to work, since there''s no way of specifying a password to pg_dump/dropdb/createdb. If you set PGPASSWORD in your environment it might work, but that''s not documented anywhere and isn''t done automatically in the Rakefile. See http://thread.gmane.org/gmane.comp.lang.ruby.rails/3693 for
2006 Jul 14
2
db:migrate question
Hi, In my environment.rb, I have set: config.active_record.schema_format = :ruby Whenever I do a rake db:migrate, both db/development_structure.sql and db/schema.rb get generated. This shouldn''t happen should it? I thought I should only get db/schema.rb? Thanks, Jordan
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 =>
2006 Feb 23
0
Searching within active record results - ror n00b
I am trying to set up a search page that looks within a product catalog. There are several many to many relationships with the items object. I am trying to be able to narrow searchs and then allow for text searches using tsearch2 and postgres. @format = Format.find(@params[:format_id]) @items = @format.items And then do a find_by_sql on the @items, but I know this isnt how you do this.
2006 May 29
2
foreign keys and referential integrity
Sans rails my normal approach to handling this would be to enforce it in the database and when a database operation failed I''d try to validate the model to produce an error message. It''s always served me pretty well. Rails expects you to validate before commiting but of course this does nothing to guarantee referential integrity. It''s perfectly possible for one