This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2025-02-01/mockenv/lib/python3.6/site-packages/pybitmessage/sql/init_version_2.sql
2022-07-22 16:13:59 +05:30

30 lines
737 B
SQL

--
-- Let's get rid of the first20bytesofencryptedmessage field in the inventory table.
--
CREATE TEMP TABLE `inventory_backup` (
`hash` blob ,
`objecttype` text ,
`streamnumber` int ,
`payload` blob ,
`receivedtime` int ,
UNIQUE(hash) ON CONFLICT REPLACE
) ;
INSERT INTO `inventory_backup` SELECT hash, objecttype, streamnumber, payload, receivedtime FROM inventory;
DROP TABLE inventory;
CREATE TABLE `inventory` (
`hash` blob ,
`objecttype` text ,
`streamnumber` int ,
`payload` blob ,
`receivedtime` int ,
UNIQUE(hash) ON CONFLICT REPLACE
) ;
INSERT INTO inventory SELECT hash, objecttype, streamnumber, payload, receivedtime FROM inventory_backup;
DROP TABLE inventory_backup;