02-build-job.sql 1.3 KB

1234567891011121314151617181920212223242526272829
  1. -- Copyright Materialize, Inc. and contributors. All rights reserved.
  2. --
  3. -- Use of this software is governed by the Business Source License
  4. -- included in the LICENSE file at the root of this repository.
  5. --
  6. -- As of the Change Date specified in that file, in accordance with
  7. -- the Business Source License, use of this software will be governed
  8. -- by the Apache License, Version 2.0.
  9. -- meta data of the build step
  10. CREATE TABLE build_job (
  11. -- build_job_id is assumed to be globally unique (build_step_id is reused on shared and retried build jobs)
  12. build_job_id TEXT NOT NULL,
  13. build_step_id TEXT NOT NULL,
  14. build_id TEXT NOT NULL,
  15. build_step_key TEXT NOT NULL,
  16. shard_index UINT4,
  17. retry_count UINT4 NOT NULL,
  18. start_time TIMESTAMPTZ, -- will eventually be changed to not null
  19. end_time TIMESTAMPTZ, -- will eventually be changed to not null
  20. insert_date TIMESTAMPTZ, -- no longer relevant since introduction of end_time, might eventually be removed
  21. is_latest_retry BOOL NOT NULL,
  22. success BOOL NOT NULL,
  23. aws_instance_type TEXT, -- deprecated, will eventually be replaced by agent_type
  24. agent_type TEXT -- will eventually be changed to not null
  25. );
  26. ALTER TABLE build_job OWNER TO qa;
  27. GRANT SELECT, INSERT, UPDATE ON TABLE build_job TO "hetzner-ci";