about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-19 00:25:52 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commitf7c5171a837c0baeb16f43dfe05beac9c6f6b78a (patch)
tree3dedd85b2d6b7c68a8d25384309ff98ff05bfe28 /app/models
parentb8b525c54a728f8ff88a53c7ceccff726cf45f30 (diff)
DB: Replace `NULL` boolean values with `FALSE` in Monsterpit feature columns; add `vars` column for persistent bangtag variable storage.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb6
-rw-r--r--app/models/status.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index a26276b9b..deeea2f58 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -46,6 +46,8 @@
 #  silenced_at             :datetime
 #  suspended_at            :datetime
 #  hidden                  :boolean
+#  hidden                  :boolean          default(FALSE), not null
+#  vars                    :jsonb            not null
 #
 
 class Account < ApplicationRecord
@@ -296,6 +298,10 @@ class Account < ApplicationRecord
     self.fields = tmp
   end
 
+  def vars
+    self[:vars]
+  end
+
   def magic_key
     modulus, exponent = [keypair.public_key.n, keypair.public_key.e].map do |component|
       result = []
diff --git a/app/models/status.rb b/app/models/status.rb
index 022296145..76923ab21 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -25,9 +25,9 @@
 #  poll_id                :bigint(8)
 #  content_type           :string
 #  tsv                    :tsvector
-#  curated                :boolean
+#  curated                :boolean          default(FALSE), not null
 #  sharekey               :string
-#  network                :boolean
+#  network                :boolean          default(FALSE), not null
 #
 
 class Status < ApplicationRecord