about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authornullkal <nullkal@nil.nu>2017-08-26 01:50:52 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-25 18:50:52 +0200
commitc2af1381130caae0acc02db853580a2bdab61078 (patch)
tree5129ff07cb41f5a132b5e7da56f7686f9c2c0776 /db/migrate
parentfb8aa2b3bac122f819b07c7f9461b26cc369c621 (diff)
Allow multiple pinned statuses to be shown and make them be ordered b… (#4690)
* Allow multiple pinned statuses to be shown and make them be ordered by pinned date

* Set timestamps NOT NULL

* Make single-line pinned_statuses

* Spec for pinned_statuses

* Remove redundant empty line
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170824103029_add_timestamps_to_status_pins.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate/20170824103029_add_timestamps_to_status_pins.rb b/db/migrate/20170824103029_add_timestamps_to_status_pins.rb
new file mode 100644
index 000000000..09f0fbeaf
--- /dev/null
+++ b/db/migrate/20170824103029_add_timestamps_to_status_pins.rb
@@ -0,0 +1,5 @@
+class AddTimestampsToStatusPins < ActiveRecord::Migration[5.1]
+  def change
+    add_timestamps :status_pins, null: false, default: -> { 'CURRENT_TIMESTAMP' }
+  end
+end