diff options
author | BonfaceKilz | 2020-05-05 15:00:53 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-05-05 15:00:53 +0300 |
commit | a5647d41c8814d67a6c2f0e5d4c237b330899c97 (patch) | |
tree | 7c403dd3e0733106426c7eae84ee7db04d80c48b | |
parent | 86d885f5f2e1069a5b1606296a71992805486aec (diff) | |
download | genenetwork2-a5647d41c8814d67a6c2f0e5d4c237b330899c97.tar.gz |
Add missing columns to db downloaded from AWS
-rw-r--r-- | scripts/add_missing_columns.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/add_missing_columns.sh b/scripts/add_missing_columns.sh new file mode 100644 index 00000000..70d5fdeb --- /dev/null +++ b/scripts/add_missing_columns.sh @@ -0,0 +1,24 @@ + #! /bin/bash + # + # Add missing columns to test db downloaded from: + # https://s3.amazonaws.com/genenetwork2/db_webqtl_s.zip + + QUERY=" + ALTER TABLE InbredSet + ADD Family varchar(20) AFTER FullName, + ADD FamilyOrder varchar(20) AFTER Family, + ADD MenuOrderId smallint(6) AFTER FamilyOrder, + ADD InbredSetCode varchar(5) AFTER MenuOrderId; + + ALTER TABLE PublishXRef + ADD mean double AFTER DataId; + + -- This takes some time + ALTER TABLE ProbeSet + ADD UniProtID varchar(20) AFTER ProteinName; + " + + USER=gn2 + DBNAME=db_webqtl_s + PASS=mysql_password + mysql -u"$USER" -p"$PASS" -h localhost -D "$DBNAME" -e "$QUERY" |