Merge branch 'feature/revision-history' of https://code.gab.com/gab/social/gab-social into develop

This commit is contained in:
Rob Colbert
2019-09-18 11:08:04 -04:00
23 changed files with 319 additions and 13 deletions

View File

@@ -6,7 +6,7 @@
# account_id :bigint(8)
# image_file_name :string
# image_content_type :string
# image_file_size :bigint(8)
# image_file_size :integer
# image_updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null

View File

@@ -24,6 +24,7 @@
# poll_id :bigint(8)
# group_id :integer
# quote_of_id :bigint(8)
# revised_at :datetime
#
class Status < ApplicationRecord
@@ -61,6 +62,7 @@ class Status < ApplicationRecord
has_many :mentions, dependent: :destroy, inverse_of: :status
has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status
has_many :media_attachments, dependent: :nullify
has_many :revisions, class_name: 'StatusRevision', dependent: :destroy
has_and_belongs_to_many :tags
has_and_belongs_to_many :preview_cards

View File

@@ -0,0 +1,13 @@
# == Schema Information
#
# Table name: status_revisions
#
# id :bigint(8) not null, primary key
# status_id :bigint(8)
# text :string
# created_at :datetime not null
# updated_at :datetime not null
#
class StatusRevision < ApplicationRecord
end