Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add initial version of DB schema #2

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

zmeecer
Copy link
Member

@zmeecer zmeecer commented Apr 27, 2018

in progress

@zmeecer zmeecer added enhancement New feature or request help wanted Extra attention is needed labels Apr 27, 2018
@zmeecer zmeecer requested a review from ok2ju April 27, 2018 17:38
```sql
CREATE TABLE person (
id SERIAL PRIMARY KEY,
login VARCHAR(20) NOT NULL,
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure about using login, name and email together

Copy link
Member

Choose a reason for hiding this comment

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

why? what wrong with it?

id SERIAL PRIMARY KEY,
login VARCHAR(20) NOT NULL,
name VARCHAR(35) NOT NULL,
email VARCHAR(35) UNIQUE NOT NULL,
Copy link
Member Author

Choose a reason for hiding this comment

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

let's use 64 length for login, name, and email

avatar_url VARCHAR
);

CREATE TABLE organization (
Copy link
Member Author

Choose a reason for hiding this comment

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

looks pretty similar to person table

CREATE TABLE membership (
organization_id INT REFERENCES organization(id),
person_id INT REFERENCES person(id),
role VARCHAR CHECK (role IN ('owner', 'member')),
Copy link
Member Author

Choose a reason for hiding this comment

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

owner or admin?

Copy link
Member

Choose a reason for hiding this comment

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

admin sounds reasonable and better

id SERIAL PRIMARY KEY,
title VARCHAR(30) NOT NULL,
description VARCHAR NOT NULL,
location VARCHAR(50),
Copy link
Member Author

Choose a reason for hiding this comment

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

location can be a list of available location

Copy link
Member

Choose a reason for hiding this comment

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

it can be, but for now it will be simple text, that user type by hands

CONSTRAINT applicant_id PRIMARY KEY (vacancy_id, person_id)
);

CREATE TABLE test (
Copy link
Member Author

Choose a reason for hiding this comment

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

test or quiz?

Copy link
Member

Choose a reason for hiding this comment

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

yea, quiz suits better

Copy link
Member

@ok2ju ok2ju left a comment

Choose a reason for hiding this comment

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

there are some comments at this MR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants