Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-10 00:09:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-10 00:09:51 +0300
commite374f6b2297582fde956350e92c19d1ae93ddfc8 (patch)
tree30be153d2883438955cfbf0d576052adc5875f67 /db
parent1268cfeaf73a73c5593f13639530513716826e2b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20230607093222_remove_webauthn_registrations_u2f_registration_id_column.rb21
-rw-r--r--db/schema_migrations/202306070932221
-rw-r--r--db/structure.sql3
3 files changed, 22 insertions, 3 deletions
diff --git a/db/post_migrate/20230607093222_remove_webauthn_registrations_u2f_registration_id_column.rb b/db/post_migrate/20230607093222_remove_webauthn_registrations_u2f_registration_id_column.rb
new file mode 100644
index 00000000000..6e861fc258a
--- /dev/null
+++ b/db/post_migrate/20230607093222_remove_webauthn_registrations_u2f_registration_id_column.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveWebauthnRegistrationsU2fRegistrationIdColumn < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_webauthn_registrations_on_u2f_registration_id'
+
+ def up
+ remove_column :webauthn_registrations, :u2f_registration_id
+ end
+
+ def down
+ add_column :webauthn_registrations, :u2f_registration_id, :integer
+
+ add_concurrent_index(
+ :webauthn_registrations,
+ :u2f_registration_id,
+ name: INDEX_NAME,
+ where: 'u2f_registration_id IS NOT NULL')
+ end
+end
diff --git a/db/schema_migrations/20230607093222 b/db/schema_migrations/20230607093222
new file mode 100644
index 00000000000..94230685b2c
--- /dev/null
+++ b/db/schema_migrations/20230607093222
@@ -0,0 +1 @@
+f2357daf5c6e21e2695987894aec547b44bb792b087dd0a46eee0b51f66285fe \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index a220ee97b84..932fb53f050 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -24579,7 +24579,6 @@ CREATE TABLE webauthn_registrations (
credential_xid text NOT NULL,
name text NOT NULL,
public_key text NOT NULL,
- u2f_registration_id integer,
CONSTRAINT check_2f02e74321 CHECK ((char_length(name) <= 255)),
CONSTRAINT check_f5ab2b551a CHECK ((char_length(credential_xid) <= 1364))
);
@@ -33377,8 +33376,6 @@ CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type);
CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON webauthn_registrations USING btree (credential_xid);
-CREATE INDEX index_webauthn_registrations_on_u2f_registration_id ON webauthn_registrations USING btree (u2f_registration_id) WHERE (u2f_registration_id IS NOT NULL);
-
CREATE INDEX index_webauthn_registrations_on_user_id ON webauthn_registrations USING btree (user_id);
CREATE INDEX index_wiki_page_meta_on_project_id ON wiki_page_meta USING btree (project_id);