Reverts !28946 because of 400 errors uploading CI artifacts
What does this MR do?
- It reverts !28946 (merged) since it's causing gitlab-com/gl-infra/production#1944 (closed). Migrations were rolled back on GitLab.com gitlab-com/gl-infra/production#1944 (comment 324479481)
- Also adds migrations to remove the constraints in case someone used the latest night build.
Migration output:
== 20200415160722 RemoveNotNullLfsObjectsConstraint: migrating ================
-- execute("ALTER TABLE lfs_objects DROP CONSTRAINT IF EXISTS lfs_objects_file_store_not_null;\n")
NOTICE: constraint "lfs_objects_file_store_not_null" of relation "lfs_objects" does not exist, skipping
-> 0.0008s
== 20200415160722 RemoveNotNullLfsObjectsConstraint: migrated (0.0059s) =======
== 20200415161021 RemoveNotNullCiJobArtifactsConstraint: migrating ============
-- execute("ALTER TABLE ci_job_artifacts DROP CONSTRAINT IF EXISTS ci_job_artifacts_file_store_not_null;\n")
NOTICE: constraint "ci_job_artifacts_file_store_not_null" of relation "ci_job_artifacts" does not exist, skipping
-> 0.0014s
== 20200415161021 RemoveNotNullCiJobArtifactsConstraint: migrated (0.0026s) ===
== 20200415161206 RemoveNotNullUploadsConstraint: migrating ===================
-- execute("ALTER TABLE uploads DROP CONSTRAINT IF EXISTS uploads_store_not_null;\n")
NOTICE: constraint "uploads_store_not_null" of relation "uploads" does not exist, skipping
-> 0.0005s
== 20200415161206 RemoveNotNullUploadsConstraint: migrated (0.0016s) ==========
Edited by Mayra Cabrera