Skip to content

Conversation

Sampath-1984
Copy link
Contributor

Overview

  1. This PR fixes or fixes part of [Feature Request]: Create seed.sql for database schema. #39 .
  2. This PR does the following: [adds the schema.sql for initialising tables and relationships in postgresql]

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
  • The PR is made from a branch that's not called "main/master".

Proof that changes are correct

Can't provide any proof of changes yet.

PR Pointers

  • If you need a review or an answer to a question, and don't have permissions to assign people, leave a comment like the following: "{{Question/comment}} @{{reviewer_username}} PTAL".
  • Never force push. If you do, your PR will be closed.

This commit adds a schema.sql that initialises tables and relationships for managing user data.

Closes bsoc-bitbyte#39
Copy link

netlify bot commented Jul 28, 2025

Deploy Preview for ydo-bsoc ready!

Name Link
🔨 Latest commit d2ee928
🔍 Latest deploy log https://app.netlify.com/projects/ydo-bsoc/deploys/688dc5d6877c41000885223e
😎 Deploy Preview https://deploy-preview-42--ydo-bsoc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Om-Thorat Om-Thorat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job sampath

CREATE TABLE user_info (
id BIGSERIAL NOT NULL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
age SMALLINT NOT NULL CHECK(age > 0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to dob.


CREATE TABLE choices_for_chooser (
chooser_id BIGINT NOT NULL REFERENCES user_info(id),
chosen_id BIGINT REFERENCES user_info(id),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this value will be encrypted make it a varchar and it won't reference anything


CREATE TABLE choices_for_chosen (
chosen_id BIGINT NOT NULL REFERENCES user_info(id),
chooser_id BIGINT REFERENCES user_info(id),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly here the value will be encrypted make it a varchar and it won't reference anything

This commit makes minor changes to the schema.sql as requested by the reviewer.

Closes bsoc-bitbyte#39
@Sampath-1984 Sampath-1984 requested a review from Om-Thorat August 2, 2025 08:03
@Om-Thorat Om-Thorat merged commit 7cbae9e into bsoc-bitbyte:main Aug 2, 2025
4 checks passed
@Om-Thorat Om-Thorat added Difficulty : Hard hard level issue BSoC'25 Created for BSoC'25 Backend labels Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend BSoC'25 Created for BSoC'25 Difficulty : Hard hard level issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants