cosmos-sdk/indexer/postgres/tests/testdata/init_schema.txt
Aaron Craelius d273ae03da
feat(schema/indexer)!: implement start indexing (#21636)
Co-authored-by: Marko <marko@baricevic.me>
2024-09-23 16:09:01 +00:00

59 lines
1.8 KiB
Plaintext

INFO: Starting indexing
INFO: Starting indexer
target_name: postgres
type: postgres
DEBUG: Creating enum type
sql: CREATE TYPE "test_my_enum" AS ENUM ('a', 'b', 'c');
DEBUG: Creating enum type
sql: CREATE TYPE "test_vote_type" AS ENUM ('yes', 'no', 'abstain');
DEBUG: Creating table %s
table: test_all_kinds
sql: CREATE TABLE IF NOT EXISTS "test_all_kinds" (
"id" BIGINT NOT NULL,
"ts" TIMESTAMPTZ GENERATED ALWAYS AS (nanos_to_timestamptz("ts_nanos")) STORED,
"ts_nanos" BIGINT NOT NULL,
"string" TEXT NOT NULL,
"bytes" BYTEA NOT NULL,
"int8" SMALLINT NOT NULL,
"uint8" SMALLINT NOT NULL,
"int16" SMALLINT NOT NULL,
"uint16" INTEGER NOT NULL,
"int32" INTEGER NOT NULL,
"uint32" BIGINT NOT NULL,
"int64" BIGINT NOT NULL,
"uint64" NUMERIC NOT NULL,
"integer" NUMERIC NOT NULL,
"decimal" NUMERIC NOT NULL,
"bool" BOOLEAN NOT NULL,
"time" TIMESTAMPTZ GENERATED ALWAYS AS (nanos_to_timestamptz("time_nanos")) STORED,
"time_nanos" BIGINT NOT NULL,
"duration" BIGINT NOT NULL,
"float32" REAL NOT NULL,
"float64" DOUBLE PRECISION NOT NULL,
"address" TEXT NOT NULL,
"enum" "test_my_enum" NOT NULL,
"json" JSONB NOT NULL,
PRIMARY KEY ("id", "ts_nanos")
);
GRANT SELECT ON TABLE "test_all_kinds" TO PUBLIC;
DEBUG: Creating table %s
table: test_singleton
sql: CREATE TABLE IF NOT EXISTS "test_singleton" (
_id INTEGER NOT NULL CHECK (_id = 1),
"foo" TEXT NOT NULL,
"bar" INTEGER NULL,
"an_enum" "test_my_enum" NOT NULL,
PRIMARY KEY (_id)
);
GRANT SELECT ON TABLE "test_singleton" TO PUBLIC;
DEBUG: Creating table %s
table: test_vote
sql: CREATE TABLE IF NOT EXISTS "test_vote" (
"proposal" BIGINT NOT NULL,
"address" TEXT NOT NULL,
"vote" "test_vote_type" NOT NULL,
_deleted BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY ("proposal", "address")
);
GRANT SELECT ON TABLE "test_vote" TO PUBLIC;