Skip to content

Business intelligence made simple

Use datetime type in migration

Andrew Kane8abf52652593
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c2df80e5..2504ab2e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
## 2.2.7 (unreleased)
+- Use `datetime` type in migration
- Fixed unpermitted parameters on dashboard page
- Fixed deprecation warnings in Ruby 2.7
diff --git a/lib/generators/blazer/templates/install.rb.tt b/lib/generators/blazer/templates/install.rb.tt
index 661d079f..999b09fd 100644
--- a/lib/generators/blazer/templates/install.rb.tt
+++ b/lib/generators/blazer/templates/install.rb.tt
@@ -14,7 +14,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
t.references :query
t.text :statement
t.string :data_source
- t.timestamp :created_at
+ t.datetime :created_at
end
create_table :blazer_dashboards do |t|
@@ -39,7 +39,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
t.text :slack_channels
t.string :check_type
t.text :message
- t.timestamp :last_run_at
+ t.datetime :last_run_at
t.timestamps null: false
end
end