Revision 12002
Added by Aaron Marcuse-Kubitza about 11 years ago
trunk/inputs/SALVIAS/salvias_plots.~.clean_up.sql | ||
---|---|---|
29 | 29 |
ALTER TABLE stems ADD FOREIGN KEY ("plotobs_id") REFERENCES "plotObservations"("PlotObsID") ON UPDATE CASCADE ON DELETE CASCADE; |
30 | 30 |
|
31 | 31 |
-- Remove private data that should not be publicly visible |
32 |
DELETE FROM "plotMetadata" WHERE "AccessCode" = 1; |
|
32 |
/* |
|
33 |
"select * from lookup_plot_security_levels; |
|
34 |
+-------+---------------------------+ |
|
35 |
| level | description | |
|
36 |
+-------+---------------------------+ |
|
37 |
| 1 | No Access | |
|
38 |
| 2 | Can view plot metadata | |
|
39 |
| 3 | Can download plot details | |
|
40 |
| 4 | Can assign access to plot | |
|
41 |
+-------+---------------------------+ |
|
42 |
" (http://vegpath.org/fs/inputs/SALVIAS/_src/salvias_data_access_controls.txt) |
|
43 |
*/ |
|
44 |
DELETE FROM "plotMetadata" WHERE "AccessCode" < 3; |
|
33 | 45 |
|
34 | 46 |
-- Ensure globally unique column names when tables are joined |
35 | 47 |
ALTER TABLE "lookup_MethodCode" RENAME "Description" TO "lookup_MethodCode_Description"; |
Also available in: Unified diff
fix: inputs/SALVIAS/salvias_plots.~.clean_up.sql: Remove private data that should not be publicly visible: also need to remove metadata-only plots