Commit 221b15bb authored by Grzegorz Bizon's avatar Grzegorz Bizon

Simplify pending builds table by removing updated_at

This applies another patch from @abrandl that only adds `created_at`
instead of full timestamps.
parent 371a0c32
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
class AddPendingBuildsTable < ActiveRecord::Migration[6.0] class AddPendingBuildsTable < ActiveRecord::Migration[6.0]
def up def up
create_table :ci_pending_builds, id: false do |t| create_table :ci_pending_builds, id: false do |t|
t.timestamps_with_timezone null: false
t.references :build, primary_key: true, default: nil, index: false, foreign_key: { to_table: :ci_builds, on_delete: :cascade } t.references :build, primary_key: true, default: nil, index: false, foreign_key: { to_table: :ci_builds, on_delete: :cascade }
t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade } t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade }
t.datetime_with_timezone :created_at, null: false, default: -> { 'NOW()' }
end end
end end
......
...@@ -10753,10 +10753,9 @@ CREATE SEQUENCE ci_namespace_monthly_usages_id_seq ...@@ -10753,10 +10753,9 @@ CREATE SEQUENCE ci_namespace_monthly_usages_id_seq
ALTER SEQUENCE ci_namespace_monthly_usages_id_seq OWNED BY ci_namespace_monthly_usages.id; ALTER SEQUENCE ci_namespace_monthly_usages_id_seq OWNED BY ci_namespace_monthly_usages.id;
CREATE TABLE ci_pending_builds ( CREATE TABLE ci_pending_builds (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
build_id bigint NOT NULL, build_id bigint NOT NULL,
project_id bigint NOT NULL project_id bigint NOT NULL,
created_at timestamp with time zone DEFAULT now() NOT NULL
); );
CREATE TABLE ci_pipeline_artifacts ( CREATE TABLE ci_pipeline_artifacts (
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment