Changeset 76b980b for database


Ignore:
Timestamp:
12/24/25 23:50:32 (7 months ago)
Author:
Tome <gjorgievtome@…>
Branches:
main
Children:
1bf6e1f
Parents:
2c6d75a
Message:

add pci_express_slots attribute

File:
1 edited

Legend:

Unmodified
Added
Removed
  • database/drizzle/schema/components.ts

    r2c6d75a r76b980b  
    2626    baseClock: numeric("base_clock").notNull(),
    2727    boostClock: numeric("boost_clock"),
    28     tdp: numeric("tdp").notNull(),
     28    tdp: numeric("tdp").notNull()
    2929});
    3030
     
    3838    boostClock: numeric("boost_clock"),
    3939    chipset: text("chipset").notNull(),
    40     length: numeric("length").notNull(),
     40    length: numeric("length").notNull()
    4141});
    4242
     
    4848    speed: numeric("speed").notNull(),
    4949    capacity: numeric("capacity").notNull(),
    50     modules: integer("modules").notNull(),
     50    modules: integer("modules").notNull()
    5151});
    5252
     
    5757    type: text("type").notNull(),
    5858    wattage: numeric("wattage").notNull(),
    59     formFactor: text("form_factor").notNull(),
     59    formFactor: text("form_factor").notNull()
    6060});
    6161
     
    6565        .references(() => componentsTable.id, { onDelete: "cascade", onUpdate: "cascade" }),
    6666    coolerMaxHeight: numeric("cooler_max_height").notNull(),
    67     gpuMaxLength: numeric("gpu_max_length").notNull(),
     67    gpuMaxLength: numeric("gpu_max_length").notNull()
    6868});
    6969
     
    7474            .references(() => pcCasesTable.componentId, {onDelete: "cascade", onUpdate: "cascade" }),
    7575        formFactor: text("form_factor").notNull(),
    76         numSlots: integer("num_slots").notNull(),
    77     },
    78     (t) => ({
    79         pk: primaryKey({ columns: [t.caseId, t.formFactor] }),
     76        numSlots: integer("num_slots").notNull()
     77    },
     78    (t) => ({
     79        pk: primaryKey({ columns: [t.caseId, t.formFactor] })
    8080    }),
    8181);
     
    8585            .notNull()
    8686            .references(() => pcCasesTable.componentId, { onDelete: "cascade", onUpdate: "cascade"}),
    87         formFactor: text("form_factor").notNull(),
    88     },
    89     (t) => ({
    90         pk: primaryKey({ columns: [t.caseId, t.formFactor] }),
     87        formFactor: text("form_factor").notNull()
     88    },
     89    (t) => ({
     90        pk: primaryKey({ columns: [t.caseId, t.formFactor] })
    9191    }),
    9292);
     
    9696            .notNull()
    9797            .references(() => pcCasesTable.componentId, { onDelete: "cascade", onUpdate: "cascade"}),
    98         formFactor: text("form_factor").notNull(),
    99     },
    100     (t) => ({
    101         pk: primaryKey({ columns: [t.caseId, t.formFactor] }),
     98        formFactor: text("form_factor").notNull()
     99    },
     100    (t) => ({
     101        pk: primaryKey({ columns: [t.caseId, t.formFactor] })
    102102    }),
    103103);
     
    109109    type: text("type").notNull(),
    110110    height: numeric("height").notNull(),
    111     maxTdpSupported: numeric("max_tdp_supported").notNull(),
     111    maxTdpSupported: numeric("max_tdp_supported").notNull()
    112112});
    113113
     
    117117            .notNull()
    118118            .references(() => coolersTable.componentId, { onDelete: "cascade", onUpdate: "cascade" }),
    119         socket: text("socket").notNull(),
    120     },
    121     (t) => ({
    122         pk: primaryKey({ columns: [t.coolerId, t.socket] }),
     119        socket: text("socket").notNull()
     120    },
     121    (t) => ({
     122        pk: primaryKey({ columns: [t.coolerId, t.socket] })
    123123    })
    124124);
     
    135135    numRamSlots: integer("num_ram_slots").notNull(),
    136136    maxRamCapacity: numeric("max_ram_capacity").notNull(),
     137    pciExpressSlots: numeric("pci_express_slots").notNull()
    137138});
    138139
     
    143144    type: text("type").notNull(),
    144145    capacity: numeric("capacity").notNull(),
    145     formFactor: text("form_factor").notNull(),
     146    formFactor: text("form_factor").notNull()
    146147});
    147148
     
    152153        .references(() => componentsTable.id, { onDelete: "cascade", onUpdate: "cascade" }),
    153154    numSlots: integer("num_slots").notNull(),
    154     interface: text("interface").notNull(),
     155    interface: text("interface").notNull()
    155156});
    156157
     
    163164    interface: text("interface").notNull(),
    164165    writeSpeed: numeric("write_speed").notNull(),
    165     readSpeed: numeric("read_speed").notNull(),
     166    readSpeed: numeric("read_speed").notNull()
    166167});
    167168
     
    174175    chipset: text("chipset").notNull(),
    175176    interface: text("interface").notNull(),
    176     channel: text("channel").notNull(),
     177    channel: text("channel").notNull()
    177178});
    178179
     
    182183        .references(() => componentsTable.id, { onDelete: "cascade", onUpdate: "cascade" }),
    183184    lengthCm: numeric("length_cm").notNull(),
    184     type: text("type").notNull(),
     185    type: text("type").notNull()
    185186});
    186187
     
    191192    wifiVersion: text("wifi_version").notNull(),
    192193    interface: text("interface").notNull(),
    193     numAntennas: integer("num_antennas").notNull(),
     194    numAntennas: integer("num_antennas").notNull()
    194195});
    195196
     
    200201    numPorts: integer("num_ports").notNull(),
    201202    speed: numeric("speed").notNull(),
    202     interface: text("interface").notNull(),
     203    interface: text("interface").notNull()
    203204});
    204205
Note: See TracChangeset for help on using the changeset viewer.