mirror of
https://github.com/status-im/status-go.git
synced 2025-02-06 11:56:01 +00:00
e9abf1662d
* chore(config)_: extract rpc_provider_persistence + tests * Add rpc_providers table, migration * add RpcProvider type * deprecate old rpc fields in networks, add RpcProviders list * add persistence packages for rpc_providers, networks * Tests
14 lines
1.0 KiB
SQL
14 lines
1.0 KiB
SQL
CREATE TABLE IF NOT EXISTS rpc_providers (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique provider ID (sorting)
|
|
chain_id INTEGER NOT NULL CHECK (chain_id > 0), -- Chain ID for the network
|
|
name TEXT NOT NULL CHECK (LENGTH(name) > 0), -- Provider name
|
|
url TEXT NOT NULL CHECK (LENGTH(url) > 0), -- Provider URL
|
|
enable_rps_limiter BOOLEAN NOT NULL DEFAULT FALSE, -- Enable RPS limiter
|
|
type TEXT NOT NULL DEFAULT 'user', -- Provider type: embedded-proxy, embedded-direct, user
|
|
enabled BOOLEAN NOT NULL DEFAULT TRUE, -- Whether the provider is active or not
|
|
auth_type TEXT NOT NULL DEFAULT 'no-auth', -- Authentication type: no-auth, basic-auth, token-auth
|
|
auth_login TEXT, -- BasicAuth login (nullable)
|
|
auth_password TEXT, -- Password for BasicAuth (nullable)
|
|
auth_token TEXT -- Token for TokenAuth (nullable)
|
|
);
|