@@ -132,8 +132,6 @@ export const userHackerData = pgTable("user_hacker_data", {
132132
133133 // metadata
134134 group : integer ( "group" ) . notNull ( ) ,
135- teamID : varchar ( "team_id" , { length : 50 } ) ,
136- points : integer ( "points" ) . notNull ( ) . default ( 0 ) ,
137135 hasAcceptedMLHCoC : boolean ( "has_accepted_mlh_coc" ) . notNull ( ) ,
138136 hasSharedDataWithMLH : boolean ( "has_shared_data_with_mlh" ) . notNull ( ) ,
139137 isEmailable : boolean ( "is_emailable" ) . notNull ( ) ,
@@ -146,11 +144,6 @@ export const userHackerRelations = relations(
146144 fields : [ userHackerData . clerkID ] ,
147145 references : [ userCommonData . clerkID ] ,
148146 } ) ,
149- team : one ( teams , {
150- fields : [ userHackerData . teamID ] ,
151- references : [ teams . id ] ,
152- } ) ,
153- invites : many ( invites ) ,
154147 } ) ,
155148) ;
156149
@@ -160,7 +153,6 @@ export const events = pgTable("events", {
160153 startTime : timestamp ( "start_time" ) . notNull ( ) ,
161154 endTime : timestamp ( "end_time" ) . notNull ( ) ,
162155 location : varchar ( "location" , { length : 255 } ) . default ( "TBD" ) ,
163- points : integer ( "points" ) . notNull ( ) . default ( 0 ) ,
164156 description : text ( "description" ) . notNull ( ) ,
165157 type : varchar ( "type" , { length : 50 } ) . notNull ( ) ,
166158 host : varchar ( "host" , { length : 255 } ) ,
@@ -211,46 +203,6 @@ export const scansRelations = relations(scans, ({ one }) => ({
211203 } ) ,
212204} ) ) ;
213205
214- export const teams = pgTable ( "teams" , {
215- id : varchar ( "id" , { length : 50 } ) . notNull ( ) . primaryKey ( ) . unique ( ) ,
216- name : varchar ( "name" , { length : 255 } ) . notNull ( ) ,
217- tag : varchar ( "tag" , { length : 50 } ) . notNull ( ) . unique ( ) ,
218- bio : text ( "bio" ) ,
219- photo : varchar ( "photo" , { length : 400 } ) . notNull ( ) ,
220- createdAt : timestamp ( "created_at" ) . notNull ( ) . defaultNow ( ) ,
221- ownerID : varchar ( "owner_id" , { length : 255 } ) . notNull ( ) ,
222- devpostURL : varchar ( "devpost_url" , { length : 255 } ) ,
223- } ) ;
224-
225- export const teamsRelations = relations ( teams , ( { one, many } ) => ( {
226- members : many ( userHackerData ) ,
227- invites : many ( invites ) ,
228- } ) ) ;
229-
230- export const invites = pgTable (
231- "invites" ,
232- {
233- inviteeID : varchar ( "invitee_id" , { length : 255 } ) . notNull ( ) ,
234- teamID : varchar ( "team_id" , { length : 50 } ) . notNull ( ) ,
235- createdAt : timestamp ( "created_at" ) . notNull ( ) . defaultNow ( ) ,
236- status : inviteType ( "status" ) . notNull ( ) . default ( "pending" ) ,
237- } ,
238- ( table ) => ( {
239- id : primaryKey ( table . inviteeID , table . teamID ) ,
240- } ) ,
241- ) ;
242-
243- export const invitesRelations = relations ( invites , ( { one } ) => ( {
244- invitee : one ( userHackerData , {
245- fields : [ invites . inviteeID ] ,
246- references : [ userHackerData . clerkID ] ,
247- } ) ,
248- team : one ( teams , {
249- fields : [ invites . teamID ] ,
250- references : [ teams . id ] ,
251- } ) ,
252- } ) ) ;
253-
254206export const errorLog = pgTable ( "error_log" , {
255207 id : varchar ( "id" , { length : 50 } ) . notNull ( ) . primaryKey ( ) ,
256208 createdAt : timestamp ( "created_at" ) . notNull ( ) . defaultNow ( ) ,
0 commit comments