databaseChangeLog: - changeSet: id: 007-jobs author: lab5 changes: - modifyDataType: tableName: attachments columnName: object_key newDataType: varchar(120) - addColumn: tableName: attachments columns: - column: name: error_code type: varchar(64) - column: name: pipeline_version type: int defaultValueNumeric: 1 constraints: nullable: false - column: name: attempt type: int defaultValueNumeric: 0 constraints: nullable: false - column: name: job_id type: uuid - column: name: staging_key type: varchar(120) - column: name: lease_until type: timestamp with time zone - column: name: lease_token type: uuid - createIndex: indexName: attachments_lease_idx tableName: attachments columns: - column: name: status - column: name: lease_until - createTable: tableName: attachment_variants columns: - column: name: id type: uuid constraints: primaryKey: true nullable: false primaryKeyName: attachment_variants_pkey - column: name: attachment_id type: uuid constraints: nullable: false - column: name: pipeline_version type: int constraints: nullable: false - column: name: name type: varchar(16) constraints: nullable: false - column: name: content_type type: varchar(32) constraints: nullable: false - column: name: size_bytes type: bigint constraints: nullable: false - column: name: width type: int constraints: nullable: false - column: name: height type: int constraints: nullable: false - column: name: sha256 type: varchar(64) constraints: nullable: false - column: name: object_key type: varchar(120) constraints: nullable: false - addUniqueConstraint: tableName: attachment_variants columnNames: attachment_id, pipeline_version, name constraintName: attachment_variants_identity_uq - addUniqueConstraint: tableName: attachment_variants columnNames: object_key constraintName: attachment_variants_object_key_uq - addForeignKeyConstraint: baseTableName: attachment_variants baseColumnNames: attachment_id referencedTableName: attachments referencedColumnNames: id constraintName: attachment_variants_attachment_fk onDelete: RESTRICT - createTable: tableName: job_outbox columns: - column: name: id type: uuid constraints: primaryKey: true nullable: false primaryKeyName: job_outbox_pkey - column: name: job_id type: uuid constraints: nullable: false - column: name: attachment_id type: uuid constraints: nullable: false - column: name: attempt type: int constraints: nullable: false - column: name: payload type: varchar(4000) constraints: nullable: false - column: name: available_at type: timestamp with time zone constraints: nullable: false - column: name: published_at type: timestamp with time zone - column: name: created_at type: timestamp with time zone constraints: nullable: false - createIndex: indexName: job_outbox_due_idx tableName: job_outbox columns: - column: name: published_at - column: name: available_at - createTable: tableName: failed_jobs columns: - column: name: id type: uuid constraints: primaryKey: true nullable: false primaryKeyName: failed_jobs_pkey - column: name: job_id type: uuid constraints: nullable: false - column: name: attachment_id type: uuid constraints: nullable: false - column: name: error_code type: varchar(64) constraints: nullable: false - column: name: attempt type: int constraints: nullable: false - column: name: created_at type: timestamp with time zone constraints: nullable: false - column: name: replayed_at type: timestamp with time zone - createTable: tableName: demo_flags columns: - column: name: name type: varchar(64) constraints: primaryKey: true nullable: false primaryKeyName: demo_flags_pkey - column: name: enabled type: boolean constraints: nullable: false