Skip to content

Commit 3e461f9

Browse files
DB migration & adjust db type (unrelated)
1 parent 0edfa07 commit 3e461f9

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ALTER TABLE RpcPlans DROP COLUMN created;
2+
ALTER TABLE RpcPlans ADD COLUMN created TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP;
3+
4+
ALTER TABLE RpcPlans DROP COLUMN expires;
5+
ALTER TABLE RpcPlans ADD COLUMN expires TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP + INTERVAL '1 months';
6+
7+
ALTER TABLE Customers DROP COLUMN created;
8+
ALTER TABLE Customers ADD COLUMN created TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP;
9+
10+
ALTER TABLE Payments DROP COLUMN date;
11+
ALTER TABLE Payments ADD COLUMN date TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP;

src/database/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub enum Chain {
8181
Base,
8282
#[cfg(test)]
8383
Anvil,
84-
#[cfg(test)]
84+
#[cfg(feature = "dev")]
8585
Sepolia,
8686
}
8787

@@ -94,7 +94,7 @@ impl Chain {
9494
Chain::Base => "base",
9595
#[cfg(test)]
9696
Chain::Anvil => "anvil",
97-
#[cfg(test)]
97+
#[cfg(feature = "dev")]
9898
Chain::Sepolia => "sepolia",
9999
}
100100
}
@@ -177,7 +177,7 @@ impl Display for Chain {
177177
Chain::Arbitrum => write!(f, "arbitrum"),
178178
#[cfg(test)]
179179
Chain::Anvil => write!(f, "anvil"),
180-
#[cfg(test)]
180+
#[cfg(feature = "dev")]
181181
Chain::Sepolia => write!(f, "sepolia"),
182182
}
183183
}

0 commit comments

Comments
 (0)