about summary refs log tree commit diff
path: root/db/migrate/20191218153258_create_announcements.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-01-24 14:37:06 +0100
committerThibaut Girka <thib@sitedethib.com>2020-01-24 14:37:06 +0100
commit9adeaf2bfc1c16ca70e611b5288886b21414217b (patch)
tree53372bc9bd6f38d158aad50c768e18773b7d3f3b /db/migrate/20191218153258_create_announcements.rb
parenta8c109baca4d02cc8aed454e231518c1f8ec1844 (diff)
parent4bae4e972d43f71bffb888ac82c180b2fa3f1ada (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/statuses_controller.rb`:
  Minor conflict due to theming system
Diffstat (limited to 'db/migrate/20191218153258_create_announcements.rb')
-rw-r--r--db/migrate/20191218153258_create_announcements.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20191218153258_create_announcements.rb b/db/migrate/20191218153258_create_announcements.rb
new file mode 100644
index 000000000..58e143c92
--- /dev/null
+++ b/db/migrate/20191218153258_create_announcements.rb
@@ -0,0 +1,16 @@
+class CreateAnnouncements < ActiveRecord::Migration[5.2]
+  def change
+    create_table :announcements do |t|
+      t.text :text, null: false, default: ''
+
+      t.boolean :published, null: false, default: false
+      t.boolean :all_day, null: false, default: false
+
+      t.datetime :scheduled_at
+      t.datetime :starts_at
+      t.datetime :ends_at
+
+      t.timestamps
+    end
+  end
+end