search for: foreign_key_check

Displaying 8 results from an estimated 8 matches for "foreign_key_check".

Did you mean: foreign_key_checks
2006 May 09
2
Disabling FOREIGN KEYs in a Rake task
...GN KEYs in a Rake task? Or, how could I call the execute() method in a Rake task? I''m trying to perform something like: task :delete_the_cippalippa => :environment do require RAILS_ROOT+''/lib/marsian.rb'' # FIXME: execute() is undefined execute "SET FOREIGN_KEY_CHECKS = 0" Cippalippa.delete(-1) [..some more code..] # FIXME: as above execute "SET FOREIGN_KEY_CHECKS = 1" end Thanks. Cheers, Marco
2006 Mar 01
1
maddening intermittent failures in unit tests with "working" code
...nd end # from http://wiki.rubyonrails.com/rails/pages/DisableForeignKeyChecksUnderMySql class Fixtures alias :original_delete_existing_fixtures :delete_existing_fixtures alias :original_insert_fixtures :insert_fixtures def delete_existing_fixtures @connection.update "SET FOREIGN_KEY_CHECKS = 0", ''Fixtures deactivate foreign key checks.''; original_delete_existing_fixtures @connection.update "SET FOREIGN_KEY_CHECKS = 1", ''Fixtures activate foreign key checks.''; end def insert_fixtures @connection.upd...
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core produced by the multiple delete on a HABTM relationship. I have confirmed that my plug-in is being included into the base during runtime however the code does not seem to be overridding the base class. module ActiveRecord module Associations module ClassMethods def has_and_belongs_to_many(association_id, options =
2014 Aug 28
2
sql codificación R
...hoy se ve feo (codificado no en español) y rjson produce un error, básicamente me informa que no es UFT-8. Desconozco que pasa, ¿alguna idea? Desde ya muchas gracias. Javier Rubén Marcuzzi ------------ próxima parte ------------ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; CREATE SCHEMA IF NOT EXISTS `usuario` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ; USE `usuario` ; -- ----------------------------------------------------- -- Tab...
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM service but no IM name should be invalid'' Mysql::Error: Cannot delete or update a parent row: a foreign key constraint fails
2010 Jun 29
2
Upgrade Too 1.2.11 Broke Everything
...iption file /var/mail/me at thavinci.za.net/.subscriptions: Not a directory Jun 29 11:52:05 thavinci dovecot: IMAP(me at thavinci.za.net): Connection closed bytes=306/4046 As can be seen somehow it's trying to write to the mbox file and I have no idea why! And this is the db structure! SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `mailbox_copy` -- ---------------------------- DROP TABLE IF EXISTS `mailbox_copy`; CREATE TABLE `mailbox_copy` ( `username` varchar(255) NOT NULL DEFAULT '', `password` varchar(255) NOT NULL DEFAULT '', `name` varchar...
2006 Jul 21
1
Capistrano before and after tasks
I try to extend db:test:copy_structure task to poulate test database with some existing data everytime i run it. It seems that "after_" task is not called as should be: > namespace :db do > namespace :test do > task :after_clone_structure do > puts "after_clone_structure_to_test" > end > end > end Anyone know what I am doing wrong?
2012 Jan 03
6
Puppet Dashboard: db:migrate failure (1.2.2 to 1.2.4)
An error I managed to hit today, trying to migrate puppet dashboard from 1.2.2 to 1.2.4 (after upgrading the master to puppet 2.7.9 seemed to prevent the dashboard from importing new reports). I''m trying to re-run it now, but as you might guess, the DB is pretty huge and the process takes a while to execute. Executed from the puppet-dashboard directory: sudo rake db:migrate