-
Notifications
You must be signed in to change notification settings - Fork 24
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
Clean db #670
Clean db #670
Conversation
…ger need to delete individual entries.
@sjanssen2 please read the "Making Database Changes" section of Qiita's contributing file. That applies to all our projects that involve DB but it is on the Qiita as we developed those docs for that project and we didn't want to duplicate the contents of that file on multiple repos. Basically, you need to update the dbschema files (dbs and html). That is how we avoid them going out of sync, and that's why I pointed out on my email that the first task to perform is sync the dbschema files with the DB. The more they go out of sync the harder will be to sync them again. |
amgut/db/patches/0041.sql
Outdated
|
||
-- a table we only read from, but never write. Thus, it is static. Can't we correct information elsewhere and get rid of this table? | ||
-- see discussion: https://github.com/biocore/american-gut-web/issues/669 | ||
--DROP TABLE ag.duplicate_consents; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 and or remove that table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am back to power now.
I think that this table will contradict with what we are going to implement with the many-to-many relation "source". And since @josenavas thinks that those information have never been validated, I'd like to remove this table. However, @EmbrietteH and @wasade needs to confirm this please.
Seems good barring @josenavas's comments |
I am running out of battery power :-( |
Okay that's fine
…On May 5, 2017 18:05, "Stefan Janssen" ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In amgut/db/patches/0041.sql
<#670 (comment)>
:
> +DROP TABLE ag.ag_import_stats_tmp;
+DROP TABLE ag.ag_map_markers;
+DROP TABLE ag.ag_participant_exceptions;
+DROP TABLE ag.ag_survey_answer;
+DROP TABLE ag.ag_survey_multiples;
+DROP TABLE ag.ag_survey_multiples_backup;
+DROP TABLE barcodes.barcode_exceptions;
+DROP TABLE ag.controlled_vocab_values;
+DROP TABLE ag.controlled_vocabs;
+
+-- we only delete information from this table, but never read or write. Can't we simply delete the full table then?
+DROP TABLE ag.promoted_survey_ids;
+
+-- a table we only read from, but never write. Thus, it is static. Can't we correct information elsewhere and get rid of this table?
+-- see discussion: #669
+--DROP <#669+--DROP> TABLE ag.duplicate_consents;
I am back to power now.
I think that this table will contradict with what we are going to
implement with the many-to-many relation "source". And since @josenavas
<https://github.com/josenavas> thinks that those information have never
been validated, I'd like to remove this table. However, @EmbrietteH
<https://github.com/EmbrietteH> and @wasade <https://github.com/wasade>
needs to confirm this please.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#670 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAc8spOpC7Ec_GWrJAyotrHwpWSCYvCQks5r26s0gaJpZM4NSMo->
.
|
I cannot find version 6.1.0 of DbSchema as a downloadable package, thus I am not able to create the HTML. Can someone else step in or point me to a download location please. |
I manually compared ag.dbs and actual table columns (with pgAdmin) and modified our schema where it was not in sync with the DB. Should be fine now. |
Hi @wasade . Thanks for the late merge! |
I never saw results it produced from the live db. @EmbrietteH, did you get a chance to review records from the "ducttape" for pulling metadata from participants with multiple distinct surveys (eg main, fermented food, etc)? I'm not sure what you mean by wrong with the solution? It was a hack to mimic the many-many relationships iirc |
I want to double check that the SQL code you created for this solution returns correct data. |
That is incorrect. I did look. The first one produced incorrect pull-down
results; I talked to you about it, you fixed it, and the second one looked
sane, and I confirmed. Unless there is something else I am not
remembering...
…On May 6, 2017 5:33 AM, "Stefan Janssen" ***@***.***> wrote:
I want to double check that the SQL code you created for this solution
returns correct data.
Before I left to Germany, I sent an example pulldown to @EmbrietteH
<https://github.com/EmbrietteH> but never got a response.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#670 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKwnj2GCGSnzBy2IA45SlJwHy6vuhAZVks5r3GiCgaJpZM4NSMo->
.
|
Sorry, I was looking in my mail box for statements why my pulldown didn't work. You did reply me - my fault. |
No worries. I usually prefer to just talk face to face as its quicker, but
you're right then you don't have then paper trail. IIRC, some the barcodes
didn't pull down so there were unexpected failures. I don't recall what the
exact problem you IDd was...
…On May 6, 2017 5:36 AM, "Stefan Janssen" ***@***.***> wrote:
Sorry, I was looking in my mail box for statements why my pulldown didn't
work. You did reply me - my fault.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#670 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKwnj66BL4TmMGverAP1vpjrkIVPbNgbks5r3Gk2gaJpZM4NSMo->
.
|
Remove unused tables, see issue #669