generated from opentensor/bittensor-subnet-template
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from Sturdy-Subnet/release/2.0.0
Release/2.0.0
- Loading branch information
Showing
42 changed files
with
3,500 additions
and
1,995 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ pyrightconfig.json | |
# databases | ||
db/schema.sql | ||
validator_database.db | ||
*test.db | ||
|
||
# backups | ||
*.bak | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
-- migrate:up | ||
|
||
CREATE TABLE IF NOT EXISTS allocation_requests ( | ||
request_uid TEXT PRIMARY KEY, | ||
assets_and_pools TEXT, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
|
||
CREATE TABLE active_allocs ( | ||
request_uid TEXT PRIMARY KEY, | ||
scoring_period_end TIMESTAMP, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
FOREIGN KEY (request_uid) REFERENCES allocation_requests (request_uid) | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS allocations ( | ||
request_uid TEXT, | ||
miner_uid TEXT, | ||
allocation TEXT, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (request_uid, miner_uid), | ||
FOREIGN KEY (request_uid) REFERENCES allocation_requests (request_uid) | ||
); | ||
|
||
-- This alter statement adds a new column to the allocations table if it exists | ||
ALTER TABLE allocation_requests | ||
ADD COLUMN request_type TEXT NOT NULL DEFAULT 1; | ||
ALTER TABLE allocation_requests | ||
ADD COLUMN metadata TEXT; | ||
ALTER TABLE allocations | ||
ADD COLUMN axon_time FLOAT NOT NULL DEFAULT 99999.0; -- large number for now | ||
|
||
-- migrate:down | ||
|
||
DROP TABLE IF EXISTS fulfilled_allocs; | ||
DROP TABLE IF EXISTS allocations; | ||
DROP TABLE IF EXISTS allocation_requests; |
Oops, something went wrong.