From f7c5171a837c0baeb16f43dfe05beac9c6f6b78a Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 19 Apr 2019 00:25:52 -0500 Subject: DB: Replace `NULL` boolean values with `FALSE` in Monsterpit feature columns; add `vars` column for persistent bangtag variable storage. --- app/models/account.rb | 6 ++++++ app/models/status.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'app') 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 -- cgit