// Code generated by go generate; DO NOT EDIT.
package db

import (
	"agola.io/agola/internal/sqlg"
)
var DDLPostgres = []string{
	"create table if not exists runwebhook (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, payload bytea NOT NULL, project_id varchar NOT NULL, PRIMARY KEY (id))",
	"create table if not exists runwebhookdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, sequence bigint generated by default as identity NOT NULL UNIQUE, run_webhook_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamptz, status_code bigint NOT NULL, PRIMARY KEY (id), foreign key (run_webhook_id) references runwebhook(id))",
	"create table if not exists lastruneventsequence (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, value bigint NOT NULL, PRIMARY KEY (id))",
	"create table if not exists commitstatus (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, project_id varchar NOT NULL, state varchar NOT NULL, commit_sha varchar NOT NULL, run_counter bigint NOT NULL, description varchar NOT NULL, context varchar NOT NULL, PRIMARY KEY (id))",
	"create table if not exists commitstatusdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamptz NOT NULL, update_time timestamptz NOT NULL, sequence bigint generated by default as identity NOT NULL UNIQUE, commit_status_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamptz, PRIMARY KEY (id), foreign key (commit_status_id) references commitstatus(id))",

	// indexes
	"create index if not exists runwebhookdelivery_sequence_idx on runwebhookdelivery(sequence)",
	"create index if not exists commitstatusdelivery_sequence_idx on commitstatusdelivery(sequence)",
}
var DDLSqlite3 = []string{
	"create table if not exists runwebhook (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, payload blob NOT NULL, project_id varchar NOT NULL, PRIMARY KEY (id))",
	"create table if not exists runwebhookdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, sequence integer NOT NULL UNIQUE, run_webhook_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamp, status_code bigint NOT NULL, PRIMARY KEY (id), foreign key (run_webhook_id) references runwebhook(id))",
	"create table if not exists lastruneventsequence (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, value bigint NOT NULL, PRIMARY KEY (id))",
	"create table if not exists commitstatus (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, project_id varchar NOT NULL, state varchar NOT NULL, commit_sha varchar NOT NULL, run_counter bigint NOT NULL, description varchar NOT NULL, context varchar NOT NULL, PRIMARY KEY (id))",
	"create table if not exists commitstatusdelivery (id varchar NOT NULL, revision bigint NOT NULL, creation_time timestamp NOT NULL, update_time timestamp NOT NULL, sequence integer NOT NULL UNIQUE, commit_status_id varchar NOT NULL, delivery_status varchar NOT NULL, delivered_at timestamp, PRIMARY KEY (id), foreign key (commit_status_id) references commitstatus(id))",

	// indexes
	"create index if not exists runwebhookdelivery_sequence_idx on runwebhookdelivery(sequence)",
	"create index if not exists commitstatusdelivery_sequence_idx on commitstatusdelivery(sequence)",
}

var Sequences = []sqlg.Sequence {
	{
		Name:   "runwebhookdelivery_sequence_seq",
		Table:  "runwebhookdelivery",
		Column: "sequence",
	},
	{
		Name:   "commitstatusdelivery_sequence_seq",
		Table:  "commitstatusdelivery",
		Column: "sequence",
	},
}
