1// Copyright (C) 2020 Storj Labs, Inc. 2// See LICENSE for copying information. 3 4package testdata 5 6import ( 7 "storj.io/storj/storagenode/storagenodedb" 8) 9 10var v32 = MultiDBState{ 11 Version: 32, 12 DBStates: DBStates{ 13 storagenodedb.UsedSerialsDBName: v28.DBStates[storagenodedb.UsedSerialsDBName], 14 storagenodedb.StorageUsageDBName: v28.DBStates[storagenodedb.StorageUsageDBName], 15 storagenodedb.ReputationDBName: v28.DBStates[storagenodedb.ReputationDBName], 16 storagenodedb.PieceSpaceUsedDBName: v31.DBStates[storagenodedb.PieceSpaceUsedDBName], 17 storagenodedb.PieceInfoDBName: v28.DBStates[storagenodedb.PieceInfoDBName], 18 storagenodedb.PieceExpirationDBName: v28.DBStates[storagenodedb.PieceExpirationDBName], 19 storagenodedb.OrdersDBName: v28.DBStates[storagenodedb.OrdersDBName], 20 storagenodedb.BandwidthDBName: v28.DBStates[storagenodedb.BandwidthDBName], 21 storagenodedb.SatellitesDBName: v28.DBStates[storagenodedb.SatellitesDBName], 22 storagenodedb.DeprecatedInfoDBName: v28.DBStates[storagenodedb.DeprecatedInfoDBName], 23 storagenodedb.NotificationsDBName: v28.DBStates[storagenodedb.NotificationsDBName], 24 storagenodedb.HeldAmountDBName: &DBState{ 25 SQL: ` 26 -- tables to hold heldamount and payments data 27 CREATE TABLE paystubs ( 28 period text NOT NULL, 29 satellite_id bytea NOT NULL, 30 created_at timestamp with time zone NOT NULL, 31 codes text NOT NULL, 32 usage_at_rest double precision NOT NULL, 33 usage_get bigint NOT NULL, 34 usage_put bigint NOT NULL, 35 usage_get_repair bigint NOT NULL, 36 usage_put_repair bigint NOT NULL, 37 usage_get_audit bigint NOT NULL, 38 comp_at_rest bigint NOT NULL, 39 comp_get bigint NOT NULL, 40 comp_put bigint NOT NULL, 41 comp_get_repair bigint NOT NULL, 42 comp_put_repair bigint NOT NULL, 43 comp_get_audit bigint NOT NULL, 44 surge_percent bigint NOT NULL, 45 held bigint NOT NULL, 46 owed bigint NOT NULL, 47 disposed bigint NOT NULL, 48 paid bigint NOT NULL, 49 PRIMARY KEY ( period, satellite_id ) 50 ); 51 CREATE TABLE payments ( 52 id bigserial NOT NULL, 53 created_at timestamp with time zone NOT NULL, 54 satellite_id bytea NOT NULL, 55 period text, 56 amount bigint NOT NULL, 57 receipt text, 58 notes text, 59 PRIMARY KEY ( id ) 60 ); 61 `, 62 }, 63 }, 64} 65