diff --git a/migrations/20241017154637_add_discord_id_field.sql b/migrations/20241017154637_add_discord_id_field.sql deleted file mode 100644 index c0e95cc..0000000 --- a/migrations/20241017154637_add_discord_id_field.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE Member ADD COLUMN discord_id TEXT; \ No newline at end of file diff --git a/src/db/member.rs b/src/db/member.rs index 36abbc9..52970f1 100644 --- a/src/db/member.rs +++ b/src/db/member.rs @@ -14,5 +14,4 @@ pub struct Member { pub sex: String, pub year: i32, pub macaddress: String, - pub discord_id: String, } diff --git a/src/graphql/mutations.rs b/src/graphql/mutations.rs index b3f6d41..dda1dfe 100644 --- a/src/graphql/mutations.rs +++ b/src/graphql/mutations.rs @@ -29,7 +29,6 @@ impl MutationRoot { sex: String, year: i32, macaddress: String, - discord_id: String, ) -> Result { let pool = ctx.data::>().expect("Pool not found in context"); @@ -37,7 +36,7 @@ impl MutationRoot { let member = sqlx::query_as::<_, Member>( - "INSERT INTO Member (rollno, name, hostel, email, sex, year, macaddress, discord_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *" + "INSERT INTO Member (rollno, name, hostel, email, sex, year, macaddress) VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING *" ) .bind(rollno) .bind(name) @@ -46,7 +45,6 @@ impl MutationRoot { .bind(sex) .bind(year) .bind(macaddress) - .bind(discord_id) .fetch_one(pool.as_ref()) .await?;