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

SQL-DB #32

Merged
merged 6 commits into from
Apr 15, 2014
Merged

SQL-DB #32

merged 6 commits into from
Apr 15, 2014

Conversation

squirrelo
Copy link
Contributor


COMMENT ON COLUMN qiita.command.command_id IS 'Unique identifier for function';

COMMENT ON COLUMN qiita.command.command IS 'what command to call to run this function';
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize What

description varchar NOT NULL,
analysis_status_id bigint NOT NULL,
biom_table_filepath varchar NOT NULL,
pmid integer ,
Copy link
Contributor

Choose a reason for hiding this comment

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

In study_pmid table, pmid is a varchar

@adamrp
Copy link
Contributor

adamrp commented Apr 10, 2014

Now, a couple general comments:

  • We have nothing in the database currently for logging. We discussed this once or twice, and I think it's a really good idea to get in ASAP (possibly blocking this)
  • We should carefully consider which foreign keys should have ON DELETE CASCADE and/or ON UPDATE CASCADE and add them where necessary

@squirrelo
Copy link
Contributor Author

+1

@squirrelo
Copy link
Contributor Author

Where are we on this? Major questions right now:

Do we want to add the logging tables now?
Do we want to add the comments on tables now?
When are we doing the cascade stuff?

@wasade
Copy link
Contributor

wasade commented Apr 11, 2014

not sure on points 2 and 3, but if we do not do logging now then it is a
pipe dream to think that it will ever actually go in

On Fri, Apr 11, 2014 at 11:22 AM, Joshua Shorenstein <
[email protected]> wrote:

Where are we on this? Major questions right now:

Do we want to add the logging tables now?
Do we want to add the comments on tables now?
When are we doing the cascade stuff?

Reply to this email directly or view it on GitHubhttps://github.com//pull/32#issuecomment-40227918
.

@squirrelo
Copy link
Contributor Author

Right, so then we need to figure out what logging tables we need and how to put them together. Can we get that done before Tuesday?

@wasade
Copy link
Contributor

wasade commented Apr 11, 2014

at the minimum, something like:

create table log_details (
log_id bigserial not null,
time datetime not null,
user_id not null, -- we may want to allow null here
severity_id int not null, -- fk into a severity table
msg varchar not null, -- the reason this is being logged
)

...with the appropriate indices of course. The reason we may want a null
user is for system events that are not tied to a specific user. We may want
to allow one or two other fields, but that above is what i believe the bare
minimum. Once this table is in place, we can then also put appropriate
logging mechanisms in place in our base classes so we can reduce the amount
of developer thought that is necessary to actually use the logging system

On Fri, Apr 11, 2014 at 11:29 AM, Joshua Shorenstein <
[email protected]> wrote:

Right, so then we need to figure out what logging tables we need and how
to put them together. Can we get that done before Tuesday?

Reply to this email directly or view it on GitHubhttps://github.com//pull/32#issuecomment-40228671
.

@squirrelo
Copy link
Contributor Author

user_id for system calls can be explicitly system that way we can query and also have not null. I'm trying to have as many not null columns as possible so we don't run into the problems of the current database of not adding things that are important because they aren't explicitly required.

May also be a good idea to log what the user was doing when it screwd up, i.e. a task column.

@squirrelo
Copy link
Contributor Author

Another column that we discussed was logging a dev error vs a user error vs a run error. This might be able to wrap into the severity info.

@wasade
Copy link
Contributor

wasade commented Apr 11, 2014

re: user_id, depends if we want granularity for what system threw the error

On Fri, Apr 11, 2014 at 11:38 AM, Joshua Shorenstein <
[email protected]> wrote:

user_id for system calls can be explicitly system that way we can query
and also have not null. I'm trying to have as many not null columns as
possible so we don't run into the problems of the current database of not
adding things that are important because they aren't explicitly required.

May also be a good idea to log what the user was doing when it screwd up,
i.e. a task column.

Reply to this email directly or view it on GitHubhttps://github.com//pull/32#issuecomment-40229482
.

@wasade
Copy link
Contributor

wasade commented Apr 11, 2014

whats the difference between a dev error and a run error?

On Fri, Apr 11, 2014 at 11:46 AM, Joshua Shorenstein <
[email protected]> wrote:

Another column that we discussed was logging a dev error vs a user error
vs a run error. This might be able to wrap into the severity info.

Reply to this email directly or view it on GitHubhttps://github.com//pull/32#issuecomment-40230579
.

@squirrelo
Copy link
Contributor Author

I have no idea, it's in my notes as that.

@squirrelo
Copy link
Contributor Author

Added logging table and two columns for password reset. This should be good to go now? HTML also reflects the changes.

@squirrelo
Copy link
Contributor Author

Do we want users to verify email before allowing login? That requires two more columns on the qiita_user table if so.

@antgonza
Copy link
Member

Not really, we can use the user_level_id to define that is not verified.

Is there something missing from this PR?

@squirrelo
Copy link
Contributor Author

Not any more as far as I can tell.

@teravest
Copy link
Contributor

I think this is good to merge and get us moving. we can always change
things later.

On Mon, Apr 14, 2014 at 2:31 PM, Joshua Shorenstein <
[email protected]> wrote:

Not any more as far as I can tell.


Reply to this email directly or view it on GitHubhttps://github.com//pull/32#issuecomment-40414352
.

antgonza added a commit that referenced this pull request Apr 15, 2014
@antgonza antgonza merged commit 3c3bf7b into qiita-spots:master Apr 15, 2014
@wasade
Copy link
Contributor

wasade commented Apr 15, 2014

exciting!

On Tue, Apr 15, 2014 at 6:25 AM, Antonio Gonzalez
[email protected]:

Merged #32 #32.

Reply to this email directly or view it on GitHubhttps://github.com//pull/32
.

@squirrelo
Copy link
Contributor Author

Touchdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants