UofS-Pulse-Binfo / nd_genotypes

Drupal/Tripal: Tripal interface for Chado Natural Diversity Genotypic data.
https://nd-genotypes.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
4 stars 1 forks source link

Support 2-digit version strings. #30

Closed laceysanderson closed 5 years ago

laceysanderson commented 5 years ago

Metadata

Documentation:

Description

Our version has the following format: PostgreSQL 9.4.10 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit whereas, @bradfordcondon's is PostgreSQL 10.5 on x86_64-apple-darwin, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00), 64-bit. Notice the difference between a 3-digit version string (Postgresql 9.4.10) and a 2-digit version string (10.4). This broke our regex to test for the version and this PR fixes that.

Testing?

The following php code can be used to test the version:

nd_genotypes_recheck_postgresql_version();
dpm(variable_get('pgsql_version', FALSE), 'version');
bradfordcondon commented 5 years ago

looks good for me, thank you

nd_genotypes
Do you really want to continue? (y/n): y
nd_genotypes was enabled successfully.                                                                                                                                                                                     [ok]
nd_genotypes defines the following permissions: access nd_genotypes, download nd_genotype_matrix
Custom table, 'genotype_call' , already exists. Table structure not changed, but definition array has been saved.                                                                                                          [status]
Your postgresql version is: 10.5                                                                                                                                                                                           [status]
________________________________________________________________________________