From 5b9633d32d34b571e661ef91c2fb59046ac515f2 Mon Sep 17 00:00:00 2001 From: ZhongFuze Date: Thu, 24 Oct 2024 17:36:41 +0800 Subject: [PATCH] [#] add ud script --- src/script/create_unstoppabledomains.sql | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/script/create_unstoppabledomains.sql diff --git a/src/script/create_unstoppabledomains.sql b/src/script/create_unstoppabledomains.sql new file mode 100644 index 0000000..e8528f7 --- /dev/null +++ b/src/script/create_unstoppabledomains.sql @@ -0,0 +1,30 @@ +CREATE TABLE unstoppabledomains ( + id SERIAL PRIMARY KEY, + namenode VARCHAR(255) NOT NULL, + name VARCHAR(1024), + label_name VARCHAR(1024), + label VARCHAR(1024), + erc721_token_id VARCHAR(255), + registration_time TIMESTAMP WITHOUT TIME ZONE, + registered_height BIGINT DEFAULT 0, + registered_hash VARCHAR(66), + registry VARCHAR(66), + expire_time TIMESTAMP WITHOUT TIME ZONE, + grace_period_ends TIMESTAMP WITHOUT TIME ZONE, + owner VARCHAR(66), + resolver VARCHAR(66), + resolved_address VARCHAR(66), + reverse_address VARCHAR(66), + is_primary BOOLEAN DEFAULT FALSE, + contenthash TEXT, + update_time TIMESTAMP WITHOUT TIME ZONE, + texts JSONB default '{}'::jsonb, + resolved_records JSONB default '{}'::jsonb, + CONSTRAINT unique_unstoppabledomains UNIQUE (namenode) +); + +CREATE INDEX unstoppabledomains_name_index ON unstoppabledomains (name); +CREATE INDEX unstoppabledomains_label_name_index ON unstoppabledomains (label_name); +CREATE INDEX unstoppabledomains_owner_index ON unstoppabledomains (owner); +CREATE INDEX unstoppabledomains_resolved_index ON unstoppabledomains (resolved_address); +CREATE INDEX unstoppabledomains_reverse_index ON unstoppabledomains (reverse_address); \ No newline at end of file