@@ -77,7 +77,7 @@ pub fn initialize_hord_db(path: &PathBuf, ctx: &Context) -> Connection {
77
77
} else {
78
78
if let Err ( e) = conn. execute (
79
79
"CREATE TABLE IF NOT EXISTS locations (
80
- inscription_id TEXT NOT NULL PRIMARY KEY ,
80
+ inscription_id TEXT NOT NULL,
81
81
block_height INTEGER NOT NULL,
82
82
tx_index INTEGER NOT NULL,
83
83
outpoint_to_watch TEXT NOT NULL,
@@ -108,6 +108,7 @@ pub fn initialize_hord_db(path: &PathBuf, ctx: &Context) -> Connection {
108
108
) {
109
109
ctx. try_log ( |logger| slog:: warn!( logger, "{}" , e. to_string( ) ) ) ;
110
110
}
111
+
111
112
if let Err ( e) = conn. execute (
112
113
"CREATE INDEX IF NOT EXISTS index_inscriptions_on_block_height ON inscriptions(block_height);" ,
113
114
[ ] ,
@@ -126,6 +127,12 @@ pub fn initialize_hord_db(path: &PathBuf, ctx: &Context) -> Connection {
126
127
) {
127
128
ctx. try_log ( |logger| slog:: warn!( logger, "{}" , e. to_string( ) ) ) ;
128
129
}
130
+ if let Err ( e) = conn. execute (
131
+ "CREATE INDEX IF NOT EXISTS index_locations_on_inscription_id ON locations(inscription_id);" ,
132
+ [ ] ,
133
+ ) {
134
+ ctx. try_log ( |logger| slog:: warn!( logger, "{}" , e. to_string( ) ) ) ;
135
+ }
129
136
}
130
137
conn
131
138
}
0 commit comments