This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MariaDB [(none)]> set old_mode=ZERO_DATE_TIME_CAST; | |
Query OK, 0 rows affected (0.00 sec) | |
MariaDB [test]> select @@old_mode, @@global.old_mode; | |
+---------------------+-------------------+ | |
| @@old_mode | @@global.old_mode | | |
+---------------------+-------------------+ | |
| ZERO_DATE_TIME_CAST | | | |
+---------------------+-------------------+ | |
1 row in set (0.00 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vicentiu has joined (~vicentiu@86.127.201.159) | |
10:36 bronson_ | |
I'm seeing a difference between mariadb and mysql... hoping someone can help me figure out a good fix. | |
bronson_ | |
I have a `time` column... I'm trying to find a record using: SELECT `foos`.* FROM `foos` WHERE `foos`.`start` = '2000-01-01 12:30:00' LIMIT 1 | |
bronson_ | |
which is, of course, outside time's proper range. | |
bronson_ | |
mysql appears to ignore the date part and find the time correctly. (and postgres and sqlite do this too) | |
bronson_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mariadb 10.1.8-MariaDB-log (root) [test]> create table t1 (id serial, t time); | |
Query OK, 0 rows affected (0.01 sec) | |
mariadb 10.1.8-MariaDB-log (root) [test]> insert into t1 (t) values ('12:30:00'); | |
Query OK, 1 row affected (0.00 sec) | |
mariadb 10.1.8-MariaDB-log (root) [test]> select * from t1 where t = '2000-01-01 12:30:00'; | |
Empty set (0.00 sec) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/bronson/.rubies/ruby-2.2.2/bin/ruby -w -I"lib:test" -I"/Users/bronson/.gem/ruby/2.2.2/gems/rake-10.5.0/lib" "/Users/bronson/.gem/ruby/2.2.2/gems/rake-10.5.0/lib/rake/rake_test_loader.rb" "/Users/bronson/rails/actioncable/test/channel/base_test.rb" "/Users/bronson/rails/actioncable/test/channel/broadcasting_test.rb" "/Users/bronson/rails/actioncable/test/channel/naming_test.rb" "/Users/bronson/rails/actioncable/test/channel/periodic_timers_test.rb" "/Users/bronson/rails/actioncable/test/channel/rejection_test.rb" "/Users/bronson/rails/actioncable/test/channel/stream_test.rb" "/Users/bronson/rails/actioncable/test/client_test.rb" "/Users/bronson/rails/actioncable/test/connection/authorization_test.rb" "/Users/bronson/rails/actioncable/test/connection/base_test.rb" "/Users/bronson/rails/actioncable/test/connection/cross_site_forgery_test.rb" "/Users/bronson/rails/actioncable/test/connection/identifier_test.rb" "/Users/bronson/rails/actioncable/test/connection/multiple_identifiers_test.rb" "/Users/bronson/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/paper_trail (master)$ ctr=; while DB=postgres rake; do echo ITERATION $((ctr += 1)); done | |
warning: parser/current is loading parser/ruby22, which recognizes | |
warning: 2.2.3-compliant syntax, but you are running 2.2.2. | |
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. | |
Running RuboCop... | |
Inspecting 31 files | |
............................... | |
31 files inspected, no offenses detected | |
Run options: --seed 57897 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ITERATION 76 | |
warning: parser/current is loading parser/ruby22, which recognizes | |
warning: 2.2.3-compliant syntax, but you are running 2.2.2. | |
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. | |
Running RuboCop... | |
Inspecting 31 files | |
............................... | |
31 files inspected, no offenses detected | |
Run options: --seed 31260 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DropProperties < ActiveRecord::Migration | |
class ChangeHistory < ActiveRecord::Base | |
# copied from real ChangeHistory model | |
scope :for_target, ->(target) { where(target_type: target.class.base_class.to_s, target_id: target.id) } | |
end | |
def change | |
drop_table :properties | |
ChangeHistory.for_target('Property').destroy | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rake | |
warning: parser/current is loading parser/ruby22, which recognizes | |
warning: 2.2.3-compliant syntax, but you are running 2.2.2. | |
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. | |
Running RuboCop... | |
Inspecting 31 files | |
............................... | |
31 files inspected, no offenses detected | |
== 20110208155312 SetUpTestTables: migrating ================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "it redirects to default search and geocodes if user isn't in us" do | |
# make it look like request is coming from europe (don't bother overriding the default lat/lon, which is in the us) | |
property = create :property, continent: 'Europe', country: 'GF', country_name: 'Grand Fenwick', marketing_latitude: 40, marketing_longitude: -120 | |
property = create :property, continent: 'Europe', country: 'LF', country_name: 'Little Fenwick', marketing_latitude: 60, marketing_longitude: -40 | |
# this IP is in Brazil. TODO: add in_americas? to static geocoding!! | |
expect(request).to receive(:remote_ip).and_return("189.81.139.183") | |
get :index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
helper_method :client_state # line 51 | |
def client_state | |
@client_state ||= ClientState.new(request, cookies) | |
end | |
helper_method :search_params # line 56 | |
def search_params | |
base_params = { pu: client_state.property_unit, lu: client_state.land_unit } |