similar to: How to truncate a table from a rake file

Displaying 20 results from an estimated 30000 matches similar to: "How to truncate a table from a rake file"

2006 May 08
4
rake db:migrate
Would it make sense for rake db:migrate to support creating databases if it is not found, with blessing from user to prevent typos, or as an additional command line switch. Or am I just being too lazy? -- Posted via http://www.ruby-forum.com/.
2011 May 25
1
rake task: uninitialized constant
I have this rake taks: CUSTOM_MONTHS = [nil, "GEN", "FEB", "MAR", "APR", "MAG", "GIU", "LUG", "AGO", "SET", "OTT", "NOV", "DIC"] def parse_date_string(date_string) begin day, month, year = date_string.split("-") Time.mktime(year, CUSTOM_MONTHS.index(month),
2007 Feb 16
5
rake db:migrate - error 'tSYMBEG'
I''m going through the ''Depot'' project in "Agile Web Development with Rails". I just made the 003_add_test_data.rb file and when I do a "rake db:migrate", I get this error and I can''t figure out what is wrong: rake aborted! ./db/migrate//003_add_test_data.rb:5: parse error, unexpected tSYMBEG 5. :description => (and the
2008 Jul 01
14
rake aborted! Could not find table ...
I am getting a rake aborted error and I suspect that I am missing a package on my system since the app works for a friend on this computer. Here is the terminal output of the error: anita@anitas-computer:~/sandbox/shovell$ rake db:migrate (in /home/anita/sandbox/shovell) rake aborted! Could not find table ''stories'' (See full trace by running task with --trace)
2006 Jan 11
2
How to execute an SQL statement in rails?
Hello, This is probably a silly question but looking at "api.rubyonrails.org", I can''t seem to figure out which method I should be using ... I want to execute an sql statement, like "truncate table BLAH" from within one of my rails app ... What''s the "right" way to do this? Thanks, /B -- Bruno Mattarollo <bruno.mattarollo@gmail.com>
2006 Jul 17
5
quantic phenomena in migrations
I have an application with 15 migrations under version control. In a Mac and and in a Windows, a rake migrate from scratch runs them all just fine. But in a different Windows machine rake migrate stops after migration 3 for no apparent reason. --trace seems normal. No error is reported. Both Windows are XP SP2. They all have the same svn revision and Rails-related software, database is
2008 Mar 20
3
cleaning up after stories
do I have to manually clear out the database after a story runs? Seems like the data the story left is still in there. Joe
2006 Mar 29
2
delete_all not resetting auto incement in database
Hey I''m writing a simple admin interface thats reading user data (skills) from a comma separated file. To clear the database before inserting new skills, I use Skill.delete_all Then I insert the new values I read from a file. Everything goes well up to the point where I see that auto-generated ID''s are not starting from 1. They start off at 840 (responding to the number of
2010 Apr 11
10
rake db:create uninitialized constant Mysql::Error
I have yet to find a solution for this issue I have tried multiple things that I have found on google, but yet have i found a solution. If someone could help me and point me in the right direction I would be much appreciated. Thanks. rake aborted! uninitialized constant Mysql::Error ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) **
2007 Apr 01
7
database.yml: encoding: utf8 does not work
Hi all According to the Agile 2nd Ed book I added the line encoding: utf8 to my database.yml connections. But now when running rake I get plenty of errors: Character set ''utf-8'' is not a compiled character set and is not specified in the ''/usr/local/mysql/share/mysql/charsets/Index'' file What''s wrong here? I checked this Index file, but it seems to
2007 Jul 18
1
Truncate table to reset id back to 1
What im using now is ActiveRecord::Base.connection.execute(''TRUNCATE table_products'') to reset the id back to 1. Is there another way without using direct sql command to reset the id back to 1? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2015 Mar 05
2
[PATCH] customize: add --truncate-recursive option
Allows user to recursively truncate all files in a directory. Related to RHBZ#119673 Maros Zatko (1): customize: add --truncate-recursive option builder/cmdline.ml | 3 ++- customize/customize_run.ml | 6 ++++++ generator/customize.ml | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) -- 1.9.3
2009 Dec 22
16
Will paginate is missing on rake db:migrate
I have a very annoying problem, when doing rake db:migrate, I get the error message: Missing these required gems: will_paginate ~> 2.3.11 But the gem is not missing, It runs very well in my app. To make the rake pass I have to comment out the gem in my environment.rb file. environment.rb: config.gem "will_paginate", :version => "~> 2.3.11", :source =>
2010 Aug 07
3
Test Database Empty after "rake test"?
Hey, can somebody tell me why my test database is always empty after I run "rake test" but not after I test single test files? My rake db:seed for the test database takes like 6 minutes and I don''t really wanna reseed it every time I run "rake test". Is it possible to not let "rake test" truncate my database? -- Posted via http://www.ruby-forum.com/. --
2015 Mar 05
2
[PATCH v2] customize: add --truncate-recursive option
Allows user to recursively truncate all files in a directory. Related to RHBZ#119673 Maros Zatko (1): customize: add --truncate-recursive option builder/cmdline.ml | 3 ++- customize/customize_run.ml | 4 ++++ generator/customize.ml | 8 ++++++++ mllib/common_utils.ml | 8 ++++++++ mllib/common_utils.mli | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) -- 1.9.3
2006 Apr 09
16
Rails 1.1.2: A tiny fix for gem dependencies
The new gem version dependency system from Rails 1.1.1 needed a few tweaks to work properly and to stop throwing meaningless warnings. This tiny release makes up for that. To install: * gem install rails * rake rails:update:configs (to get the latest config/boot.rb) This release also signals our new commitment to do more tiny releases from the stable branch, which only gets bug fixes. So it will
2011 Aug 16
4
Dashboard table resource_statuses growing uncontrollably
I''ve "inherited" the administration of a puppet-dashboard (version 1.1.0, installed on RHEL 5.6 from puppetlabs RPM), and have hit a problem I''m hoping for some help with. In short, one table, "resource_statuses" appears to be growing at a rate far higher then the other tables: mysql> select count(*) from nodes; +----------+ | count(*) | +----------+ |
2019 Mar 29
2
Re: [PATCH nbdkit v5 FINAL 12/19] truncate: Implement extents for beyond end of truncated region.
On 3/28/19 11:18 AM, Richard W.M. Jones wrote: > --- > filters/truncate/truncate.c | 55 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 55 insertions(+) > > + > + /* If the entire request is beyond the end of the underlying plugin > + * then this is the easy case: return a hole. > + */ > + if (offset >= real_size_copy) > + return
2008 Feb 04
5
clean all records
hi @ all How can I clean all records from a table in a mysql database without delete the table in the database? (only use a method in the model) thanks for helping! -- 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,
2015 Mar 05
1
[PATCH] add --truncate to virt-customize
Fixes RHBZ#119673. Maros Zatko (1): customize: add --truncate option (RHBZ#119673) builder/cmdline.ml | 2 +- customize/customize_run.ml | 4 ++++ generator/customize.ml | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) -- 1.9.3