about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-07-15 18:17:37 +0200
committerThibaut Girka <thib@sitedethib.com>2018-07-16 14:50:42 +0200
commitf26f1145ac0fab4a657ee1fc784e824858601bd3 (patch)
tree3980b53a1440a8e6d4ee8c539668c3c190363017 /db/migrate
parent8e8491e1dab5e2ed98770710e0a32484de8530b3 (diff)
parent7a686082370ad6d1c7a7d0ad331c22bf3e1fbede (diff)
Merge branch 'master' into glitch-soc/merge-upstream
 Conflicts:
	Dockerfile
	app/javascript/packs/common.js
	config/webpack/loaders/sass.js
	config/webpack/shared.js
	db/schema.rb
	package.json
	yarn.lock

A lot of the conflicts come from updating webpack.

Even though upstream deleted app/javascript/packs/common.js, I kept
glitch-soc's version as it unifies JS/CSS packs behavior across flavours.

Ported glitch changes to webpack 4.x
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb2
-rw-r--r--db/migrate/20180711152640_create_relays.rb12
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb b/db/migrate/20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb
index 4a8761fec..ccd2ec7ea 100644
--- a/db/migrate/20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb
+++ b/db/migrate/20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb
@@ -5,7 +5,7 @@ class RevertIndexChangeOnStatusesForApiV1AccountsAccountIdStatuses < ActiveRecor
 
   def change
     safety_assured do
-      add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 unless index_exists?(:statuses, name: "index_statuses_20180106")
+      add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 unless index_name_exists?(:statuses, "index_statuses_20180106")
     end
 
     # These index may not exists (see migration 20180514130000)
diff --git a/db/migrate/20180711152640_create_relays.rb b/db/migrate/20180711152640_create_relays.rb
new file mode 100644
index 000000000..8762f473a
--- /dev/null
+++ b/db/migrate/20180711152640_create_relays.rb
@@ -0,0 +1,12 @@
+class CreateRelays < ActiveRecord::Migration[5.2]
+  def change
+    create_table :relays do |t|
+      t.string :inbox_url, default: '', null: false
+      t.boolean :enabled, default: false, null: false, index: true
+
+      t.string :follow_activity_id
+
+      t.timestamps
+    end
+  end
+end