Skip to content

Commit

Permalink
chore: Ensure null validation for private attribute in messages (#8085)
Browse files Browse the repository at this point in the history
  • Loading branch information
sojan-official committed Oct 11, 2023
1 parent cbae954 commit a3d008d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/message.rb
Expand Up @@ -9,7 +9,7 @@
# content_type :integer default("text"), not null
# external_source_ids :jsonb
# message_type :integer not null
# private :boolean default(FALSE)
# private :boolean default(FALSE), not null
# processed_message_content :text
# sender_type :string
# sentiment :jsonb
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20231011041615_ensure_message_private_not_null.rb
@@ -0,0 +1,5 @@
class EnsureMessagePrivateNotNull < ActiveRecord::Migration[7.0]
def change
change_column_null :messages, :private, false, false
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2023_08_01_180936) do
ActiveRecord::Schema[7.0].define(version: 2023_10_11_041615) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "pg_trgm"
Expand Down Expand Up @@ -661,7 +661,7 @@
t.integer "message_type", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.boolean "private", default: false
t.boolean "private", default: false, null: false
t.integer "status", default: 0
t.string "source_id"
t.integer "content_type", default: 0, null: false
Expand Down
2 changes: 1 addition & 1 deletion enterprise/app/models/response.rb
Expand Up @@ -6,7 +6,7 @@
# answer :text not null
# embedding :vector(1536)
# question :string not null
# status :integer default(0)
# status :integer default("pending")
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
Expand Down

0 comments on commit a3d008d

Please sign in to comment.