mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2025-01-09 05:06:55 +01:00
Revert "add emoji reaction database model"
I didn't intend to commit this to main and it's
kind of a work in progress anyway.
This reverts commit 0da3340f0d
.
This commit is contained in:
parent
0da3340f0d
commit
416d42e949
6 changed files with 1 additions and 63 deletions
|
@ -1,16 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: emoji_reactions
|
||||
#
|
||||
# id :bigint(8) not null, primary key
|
||||
# emoji :string
|
||||
# status_id :bigint(8) not null
|
||||
# account_id :bigint(8) not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class EmojiReaction < ApplicationRecord
|
||||
belongs_to :status
|
||||
belongs_to :account
|
||||
end
|
|
@ -70,7 +70,6 @@ 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 :emoji_reactions
|
||||
|
||||
has_and_belongs_to_many :tags
|
||||
has_and_belongs_to_many :preview_cards
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
class CreateEmojiReactions < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :emoji_reactions do |t|
|
||||
t.string :emoji
|
||||
t.references :status, null: false, foreign_key: true
|
||||
t.references :account, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
26
db/schema.rb
26
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: 2022_11_23_004534) do
|
||||
ActiveRecord::Schema.define(version: 2022_11_04_133904) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -411,16 +411,6 @@ ActiveRecord::Schema.define(version: 2022_11_23_004534) do
|
|||
t.index ["domain"], name: "index_email_domain_blocks_on_domain", unique: true
|
||||
end
|
||||
|
||||
create_table "emoji_reactions", force: :cascade do |t|
|
||||
t.string "emoji"
|
||||
t.bigint "status_id", null: false
|
||||
t.bigint "account_id", null: false
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.index ["account_id"], name: "index_emoji_reactions_on_account_id"
|
||||
t.index ["status_id"], name: "index_emoji_reactions_on_status_id"
|
||||
end
|
||||
|
||||
create_table "encrypted_messages", id: :bigint, default: -> { "timestamp_id('encrypted_messages'::text)" }, force: :cascade do |t|
|
||||
t.bigint "device_id"
|
||||
t.bigint "from_account_id"
|
||||
|
@ -791,16 +781,6 @@ ActiveRecord::Schema.define(version: 2022_11_23_004534) do
|
|||
t.index ["status_id", "preview_card_id"], name: "index_preview_cards_statuses_on_status_id_and_preview_card_id"
|
||||
end
|
||||
|
||||
create_table "reactions", force: :cascade do |t|
|
||||
t.string "emoji"
|
||||
t.bigint "status_id", null: false
|
||||
t.bigint "account_id", null: false
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.index ["account_id"], name: "index_reactions_on_account_id"
|
||||
t.index ["status_id"], name: "index_reactions_on_status_id"
|
||||
end
|
||||
|
||||
create_table "relays", force: :cascade do |t|
|
||||
t.string "inbox_url", default: "", null: false
|
||||
t.string "follow_activity_id"
|
||||
|
@ -1178,8 +1158,6 @@ ActiveRecord::Schema.define(version: 2022_11_23_004534) do
|
|||
add_foreign_key "devices", "accounts", on_delete: :cascade
|
||||
add_foreign_key "devices", "oauth_access_tokens", column: "access_token_id", on_delete: :cascade
|
||||
add_foreign_key "email_domain_blocks", "email_domain_blocks", column: "parent_id", on_delete: :cascade
|
||||
add_foreign_key "emoji_reactions", "accounts"
|
||||
add_foreign_key "emoji_reactions", "statuses"
|
||||
add_foreign_key "encrypted_messages", "accounts", column: "from_account_id", on_delete: :cascade
|
||||
add_foreign_key "encrypted_messages", "devices", on_delete: :cascade
|
||||
add_foreign_key "favourites", "accounts", name: "fk_5eb6c2b873", on_delete: :cascade
|
||||
|
@ -1220,8 +1198,6 @@ ActiveRecord::Schema.define(version: 2022_11_23_004534) do
|
|||
add_foreign_key "polls", "accounts", on_delete: :cascade
|
||||
add_foreign_key "polls", "statuses", on_delete: :cascade
|
||||
add_foreign_key "preview_card_trends", "preview_cards", on_delete: :cascade
|
||||
add_foreign_key "reactions", "accounts"
|
||||
add_foreign_key "reactions", "statuses"
|
||||
add_foreign_key "report_notes", "accounts", on_delete: :cascade
|
||||
add_foreign_key "report_notes", "reports", on_delete: :cascade
|
||||
add_foreign_key "reports", "accounts", column: "action_taken_by_account_id", name: "fk_bca45b75fd", on_delete: :nullify
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
Fabricator(:emoji_reaction) do
|
||||
emoji "MyString"
|
||||
status nil
|
||||
account nil
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe EmojiReaction, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in a new issue