I hereby claim:
- I am chunpan on github.
- I am bpan (https://keybase.io/bpan) on keybase.
- I have a public key whose fingerprint is 25B5 823C F1D5 AE22 04AD 48B9 BDD5 B72A BCEE 81E8
To claim this, I am signing this object:
| # | |
| # Check for every table with temporal columns if there are records that have dates set to '0000-00-00' | |
| conn = ActiveRecord::Base.connection | |
| # get a list of tables and columns with a date type excluding merge tables | |
| query = "select concat(`table_schema`,'.',`table_name`) as table_name,`COLUMN_NAME` from information_schema.`columns` where data_type like '%date%' AND concat(`table_schema`,'.',`table_name`) not in (select concat(`table_schema`,'.',`table_name`) from information_schema.tables where engine='mrg_myisam');" | |
| list = conn.select_all( query ) | |
| # transform the list a bit for later querying |
| require 'active_support/core_ext/class/attribute' | |
| require 'active_support/concern' | |
| # This module enables a simple declaration for the including ActiveRecord model | |
| # class to specify one or more columns (attributes) to automatically truncate | |
| # its length to a max value or as defined by the column width in your schema. | |
| # | |
| # Usage example: | |
| # | |
| # class MyModel << ActiveRecord::Base |
| # A service to properly route feature toggles, similar to Promote's Gate mechanism, | |
| # but greatly simplified. | |
| # @see https://martinfowler.com/articles/feature-toggles.html | |
| class FeatureToggleService | |
| attr_reader :config | |
| DEFAULT_CONFIG_PATH = Rails.root.join('config', 'feature_toggles.yml') | |
| def initialize(config: nil) | |
| @config = |
I hereby claim:
To claim this, I am signing this object: