initial run todos
This commit is contained in:
parent
730d932835
commit
0223db6587
@ -14,8 +14,7 @@ func init(){
|
||||
}
|
||||
|
||||
const migrateScript = `
|
||||
alter table blocks add mtime integer default NULL;
|
||||
update blocks set mtime = strftime('%s', 'now');
|
||||
alter table blocks add mtime integer default 0;
|
||||
create index blocks_mtime on blocks(mtime);
|
||||
|
||||
CREATE TRIGGER update_blocks_mtime_insert after insert on blocks for each row
|
||||
@ -29,6 +28,9 @@ update blocks set mtime = strftime('%s', 'now') where pos = old.pos;
|
||||
end;
|
||||
`
|
||||
|
||||
//TODO: initial run: https://stackoverflow.com/questions/14468586/efficient-paging-in-sqlite-with-millions-of-records
|
||||
//TODO: postgres test
|
||||
|
||||
type Sqlite3Accessor struct {
|
||||
db *sql.DB
|
||||
filename string
|
||||
|
Loading…
Reference in New Issue
Block a user