add sqlite to cache token metadata
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE `token_metadata` (
|
||||
`name` text,
|
||||
`symbol` text NOT NULL,
|
||||
`decimals` integer,
|
||||
`logo` text,
|
||||
`contractAddress` text NOT NULL,
|
||||
`chainId` text NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `contract_unique` ON `token_metadata` (`chainId`,`contractAddress`);
|
||||
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"version": "7",
|
||||
"dialect": "sqlite",
|
||||
"id": "2845d968-33cd-48b6-8944-03e0e46a4a90",
|
||||
"prevIds": [
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
],
|
||||
"ddl": [
|
||||
{
|
||||
"name": "token_metadata",
|
||||
"entityType": "tables"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": null,
|
||||
"generated": null,
|
||||
"name": "name",
|
||||
"entityType": "columns",
|
||||
"table": "token_metadata"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": null,
|
||||
"generated": null,
|
||||
"name": "symbol",
|
||||
"entityType": "columns",
|
||||
"table": "token_metadata"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": null,
|
||||
"generated": null,
|
||||
"name": "decimals",
|
||||
"entityType": "columns",
|
||||
"table": "token_metadata"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": null,
|
||||
"generated": null,
|
||||
"name": "logo",
|
||||
"entityType": "columns",
|
||||
"table": "token_metadata"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": null,
|
||||
"generated": null,
|
||||
"name": "contractAddress",
|
||||
"entityType": "columns",
|
||||
"table": "token_metadata"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": null,
|
||||
"generated": null,
|
||||
"name": "chainId",
|
||||
"entityType": "columns",
|
||||
"table": "token_metadata"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"value": "chainId",
|
||||
"isExpression": false
|
||||
},
|
||||
{
|
||||
"value": "contractAddress",
|
||||
"isExpression": false
|
||||
}
|
||||
],
|
||||
"isUnique": true,
|
||||
"where": null,
|
||||
"origin": "manual",
|
||||
"name": "contract_unique",
|
||||
"entityType": "indexes",
|
||||
"table": "token_metadata"
|
||||
}
|
||||
],
|
||||
"renames": []
|
||||
}
|
||||
Reference in New Issue
Block a user