|
1 | | -import { pgTable, uuid, char, bigint, text, timestamp } from "drizzle-orm/pg-core" |
2 | | -import { sql } from "drizzle-orm" |
3 | | - |
4 | | - |
| 1 | +import { |
| 2 | + bigint, |
| 3 | + char, |
| 4 | + pgTable, |
| 5 | + text, |
| 6 | + timestamp, |
| 7 | + uuid, |
| 8 | +} from "drizzle-orm/pg-core"; |
5 | 9 |
|
6 | 10 | export const bundles = pgTable("bundles", { |
7 | | - id: uuid().primaryKey().notNull(), |
8 | | - senders: char({ length: 42 }).array(), |
9 | | - // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
10 | | - minimumBaseFee: bigint("minimum_base_fee", { mode: "number" }), |
11 | | - txnHashes: char("txn_hashes", { length: 66 }).array(), |
12 | | - txs: text().array().notNull(), |
13 | | - revertingTxHashes: char("reverting_tx_hashes", { length: 66 }).array(), |
14 | | - droppingTxHashes: char("dropping_tx_hashes", { length: 66 }).array(), |
15 | | - // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
16 | | - blockNumber: bigint("block_number", { mode: "number" }), |
17 | | - // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
18 | | - minTimestamp: bigint("min_timestamp", { mode: "number" }), |
19 | | - // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
20 | | - maxTimestamp: bigint("max_timestamp", { mode: "number" }), |
21 | | - createdAt: timestamp("created_at", { withTimezone: true, mode: 'string' }).notNull(), |
22 | | - updatedAt: timestamp("updated_at", { withTimezone: true, mode: 'string' }).notNull(), |
| 11 | + id: uuid().primaryKey().notNull(), |
| 12 | + senders: char({ length: 42 }).array(), |
| 13 | + // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
| 14 | + minimumBaseFee: bigint("minimum_base_fee", { mode: "number" }), |
| 15 | + txnHashes: char("txn_hashes", { length: 66 }).array(), |
| 16 | + txs: text().array().notNull(), |
| 17 | + revertingTxHashes: char("reverting_tx_hashes", { length: 66 }).array(), |
| 18 | + droppingTxHashes: char("dropping_tx_hashes", { length: 66 }).array(), |
| 19 | + // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
| 20 | + blockNumber: bigint("block_number", { mode: "number" }), |
| 21 | + // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
| 22 | + minTimestamp: bigint("min_timestamp", { mode: "number" }), |
| 23 | + // You can use { mode: "bigint" } if numbers are exceeding js number limitations |
| 24 | + maxTimestamp: bigint("max_timestamp", { mode: "number" }), |
| 25 | + createdAt: timestamp("created_at", { |
| 26 | + withTimezone: true, |
| 27 | + mode: "string", |
| 28 | + }).notNull(), |
| 29 | + updatedAt: timestamp("updated_at", { |
| 30 | + withTimezone: true, |
| 31 | + mode: "string", |
| 32 | + }).notNull(), |
23 | 33 | }); |
0 commit comments