about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-03-25 15:17:21 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-03-25 15:17:21 +0000
commit837b3804bfed9db1cf92923c4f6202aa7117d408 (patch)
treec8b5a921754a6b40227364225002332b54d0d0dd /db
parent995b59526b06e1f949cba59d76e5e2718a1674f6 (diff)
parent85a395fab6d7077a252bfe6f96673931ea3aa5ee (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180310000000_change_columns_in_notifications_nonnullable.rb8
-rw-r--r--db/schema.rb10
2 files changed, 13 insertions, 5 deletions
diff --git a/db/migrate/20180310000000_change_columns_in_notifications_nonnullable.rb b/db/migrate/20180310000000_change_columns_in_notifications_nonnullable.rb
new file mode 100644
index 000000000..05ffd0501
--- /dev/null
+++ b/db/migrate/20180310000000_change_columns_in_notifications_nonnullable.rb
@@ -0,0 +1,8 @@
+class ChangeColumnsInNotificationsNonnullable < ActiveRecord::Migration[5.1]
+  def change
+    change_column_null :notifications, :activity_id, false
+    change_column_null :notifications, :activity_type, false
+    change_column_null :notifications, :account_id, false
+    change_column_null :notifications, :from_account_id, false
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 70420d396..7737c1123 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20180304013859) do
+ActiveRecord::Schema.define(version: 20180310000000) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -283,12 +283,12 @@ ActiveRecord::Schema.define(version: 20180304013859) do
   end
 
   create_table "notifications", force: :cascade do |t|
-    t.bigint "activity_id"
-    t.string "activity_type"
+    t.bigint "activity_id", null: false
+    t.string "activity_type", null: false
     t.datetime "created_at", null: false
     t.datetime "updated_at", null: false
-    t.bigint "account_id"
-    t.bigint "from_account_id"
+    t.bigint "account_id", null: false
+    t.bigint "from_account_id", null: false
     t.index ["account_id", "activity_id", "activity_type"], name: "account_activity", unique: true
     t.index ["account_id", "id"], name: "index_notifications_on_account_id_and_id", order: { id: :desc }
     t.index ["activity_id", "activity_type"], name: "index_notifications_on_activity_id_and_activity_type"