summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 09:09:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 09:09:39 +0000
commitc52b81f45762cb7f05a950689dfc6d51b197ea73 (patch)
treec44830c2fc21d13b81814958c44b09fa8d11c805 /db
parent187ee320b39af22929d74c5a2d9b0650bf50a09b (diff)
downloadgitlab-ce-c52b81f45762cb7f05a950689dfc6d51b197ea73.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200318183553_create_pypi_package_metadata.rb14
-rw-r--r--db/structure.sql12
2 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20200318183553_create_pypi_package_metadata.rb b/db/migrate/20200318183553_create_pypi_package_metadata.rb
new file mode 100644
index 00000000000..3f0204d51ac
--- /dev/null
+++ b/db/migrate/20200318183553_create_pypi_package_metadata.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class CreatePypiPackageMetadata < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ create_table :packages_pypi_metadata, id: false do |t|
+ t.references :package, primary_key: true, index: false, default: nil, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint
+ t.string "required_python", null: false, limit: 50
+ end
+ end
+end
diff --git a/db/structure.sql b/db/structure.sql
index 3faa5499f6c..d45ad4f739c 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -4493,6 +4493,11 @@ CREATE SEQUENCE public.packages_packages_id_seq
ALTER SEQUENCE public.packages_packages_id_seq OWNED BY public.packages_packages.id;
+CREATE TABLE public.packages_pypi_metadata (
+ package_id bigint NOT NULL,
+ required_python character varying(50) NOT NULL
+);
+
CREATE TABLE public.packages_tags (
id bigint NOT NULL,
package_id integer NOT NULL,
@@ -8146,6 +8151,9 @@ ALTER TABLE ONLY public.packages_package_files
ALTER TABLE ONLY public.packages_packages
ADD CONSTRAINT packages_packages_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.packages_pypi_metadata
+ ADD CONSTRAINT packages_pypi_metadata_pkey PRIMARY KEY (package_id);
+
ALTER TABLE ONLY public.packages_tags
ADD CONSTRAINT packages_tags_pkey PRIMARY KEY (id);
@@ -11596,6 +11604,9 @@ ALTER TABLE ONLY public.board_labels
ALTER TABLE ONLY public.scim_identities
ADD CONSTRAINT fk_rails_9421a0bffb FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY public.packages_pypi_metadata
+ ADD CONSTRAINT fk_rails_9698717cdd FOREIGN KEY (package_id) REFERENCES public.packages_packages(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY public.packages_dependency_links
ADD CONSTRAINT fk_rails_96ef1c00d3 FOREIGN KEY (package_id) REFERENCES public.packages_packages(id) ON DELETE CASCADE;
@@ -13032,6 +13043,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200318164448
20200318165448
20200318175008
+20200318183553
20200319071702
20200319123041
20200319124127