Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/activitypub/collections_controller.rb`: Conflict due to glitch-soc having to take care of local-only pinned toots in that controller. Took upstream's changes and restored the local-only special handling. - `app/controllers/auth/sessions_controller.rb`: Minor conflicts due to the theming system, applied upstream changes, adapted the following two files for glitch-soc's theming system: - `app/controllers/concerns/sign_in_token_authentication_concern.rb` - `app/controllers/concerns/two_factor_authentication_concern.rb` - `app/services/backup_service.rb`: Minor conflict due to glitch-soc having to handle local-only toots specially. Applied upstream changes and restored the local-only special handling. - `app/views/admin/custom_emojis/index.html.haml`: Minor conflict due to the theming system. - `package.json`: Upstream dependency updated, too close to a glitch-soc-only dependency in the file. - `yarn.lock`: Upstream dependency updated, too close to a glitch-soc-only dependency in the file.
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
class CreateDevices < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :devices do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.string :registration_id, null: false, default: ''
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :devices, :registration_id
|
||||
add_index :devices, :account_id
|
||||
end
|
||||
end
|
@@ -1,5 +1,5 @@
|
||||
class RemoveDevices < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
drop_table :devices
|
||||
drop_table :devices if table_exists?(:devices)
|
||||
end
|
||||
end
|
||||
|
14
db/migrate/20200516180352_create_devices.rb
Normal file
14
db/migrate/20200516180352_create_devices.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateDevices < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :devices do |t|
|
||||
t.references :access_token, foreign_key: { to_table: :oauth_access_tokens, on_delete: :cascade, index: :unique }
|
||||
t.references :account, foreign_key: { on_delete: :cascade }
|
||||
t.string :device_id, default: '', null: false
|
||||
t.string :name, default: '', null: false
|
||||
t.text :fingerprint_key, default: '', null: false
|
||||
t.text :identity_key, default: '', null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
12
db/migrate/20200516183822_create_one_time_keys.rb
Normal file
12
db/migrate/20200516183822_create_one_time_keys.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateOneTimeKeys < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :one_time_keys do |t|
|
||||
t.references :device, foreign_key: { on_delete: :cascade }
|
||||
t.string :key_id, default: '', null: false, index: :unique
|
||||
t.text :key, default: '', null: false
|
||||
t.text :signature, default: '', null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
15
db/migrate/20200518083523_create_encrypted_messages.rb
Normal file
15
db/migrate/20200518083523_create_encrypted_messages.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateEncryptedMessages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :encrypted_messages do |t|
|
||||
t.references :device, foreign_key: { on_delete: :cascade }
|
||||
t.references :from_account, foreign_key: { to_table: :accounts, on_delete: :cascade }
|
||||
t.string :from_device_id, default: '', null: false
|
||||
t.integer :type, default: 0, null: false
|
||||
t.text :body, default: '', null: false
|
||||
t.text :digest, default: '', null: false
|
||||
t.text :message_franking, default: '', null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,13 @@
|
||||
class EncryptedMessageIdsToTimestampIds < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
safety_assured do
|
||||
execute("ALTER TABLE encrypted_messages ALTER COLUMN id SET DEFAULT timestamp_id('encrypted_messages')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
execute("LOCK encrypted_messages")
|
||||
execute("SELECT setval('encrypted_messages_id_seq', (SELECT MAX(id) FROM encrypted_messages))")
|
||||
execute("ALTER TABLE encrypted_messages ALTER COLUMN id SET DEFAULT nextval('encrypted_messages_id_seq')")
|
||||
end
|
||||
end
|
5
db/migrate/20200529214050_add_devices_url_to_accounts.rb
Normal file
5
db/migrate/20200529214050_add_devices_url_to_accounts.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddDevicesUrlToAccounts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :accounts, :devices_url, :string
|
||||
end
|
||||
end
|
9
db/migrate/20200601222558_create_system_keys.rb
Normal file
9
db/migrate/20200601222558_create_system_keys.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateSystemKeys < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :system_keys do |t|
|
||||
t.binary :key
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,5 @@
|
||||
class AddBlurhashToPreviewCards < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :preview_cards, :blurhash, :string
|
||||
end
|
||||
end
|
6
db/migrate/20200608113046_add_sign_in_token_to_users.rb
Normal file
6
db/migrate/20200608113046_add_sign_in_token_to_users.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddSignInTokenToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :sign_in_token, :string
|
||||
add_column :users, :sign_in_token_sent_at, :datetime
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user