Author Topic: Setting up an instance of TM's DB and web front end  (Read 305 times)

0 Members and 1 Guest are viewing this topic.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2055
  • Last Login:Today at 12:35:30 pm
Re: Setting up an instance of TM's DB and web front end
« Reply #15 on: June 30, 2019, 08:29:12 pm »
Sure, TravelMappingTest works. Thanks!

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1608
  • Last Login:Today at 02:29:48 pm
Re: DOWNTIME COMING: 7/13/2019
« Reply #16 on: July 09, 2019, 01:10:18 pm »
I've got a mirror running at http://205.209.84.174, so we won't have to go without our fix for a day. :)

Cool 8) I don't wanna complain - I'm very happy that it's working :D - but does your PC have a clock so that you can show the timestamp of "the most recent site update completed"? ;)

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2055
  • Last Login:Today at 12:35:30 pm
Re: Re: DOWNTIME COMING: 7/13/2019
« Reply #17 on: July 09, 2019, 01:12:52 pm »
 I haven't paid any attention to that feature. I'll have to give it a look.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2055
  • Last Login:Today at 12:35:30 pm
Re: Setting up an instance of TM's DB and web front end
« Reply #18 on: July 09, 2019, 01:29:56 pm »
Code: [Select]
// get the timestamp of most recent DB update
function tm_update_time() {
    global $tmdb;
    global $tmdbname;
    $sql_command = "SELECT create_time FROM information_schema.tables WHERE TABLE_SCHEMA = '".$tmdbname."' ORDER BY create_time DESC;";
    global $tmsqldebug;
    if ($tmsqldebug) {
        echo "<!-- SQL: ".$sql_command." -->\n";
    }
    $res = tmdb_query($sql_command);
    $row = $res->fetch_assoc();
    $ans = $row['create_time'];
    $res->free();
    return $ans;
}

Code: [Select]
mysql> SELECT create_time FROM information_schema.tables WHERE TABLE_SCHEMA = 'TravelMapping' ORDER BY create_time DESC;
+---------------------+
| CREATE_TIME         |
+---------------------+
| 2019-07-09 10:52:07 |
| 2019-07-09 10:52:07 |
| 2019-07-09 10:52:06 |
| 2019-07-09 10:52:06 |
| 2019-07-09 10:52:05 |
| 2019-07-09 10:51:57 |
| 2019-07-09 10:51:51 |
| 2019-07-09 10:51:49 |
| 2019-07-09 10:51:48 |
| 2019-07-09 10:51:48 |
| 2019-07-09 10:51:48 |
| 2019-07-09 10:50:42 |
| 2019-07-09 10:50:16 |
| 2019-07-09 10:50:14 |
| 2019-07-09 10:49:51 |
| 2019-07-09 10:49:49 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
| 2019-07-09 10:49:46 |
+---------------------+
21 rows in set (0.00 sec)
I'm not sure what's happening.
« Last Edit: July 09, 2019, 01:47:59 pm by yakra »

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2055
  • Last Login:Today at 12:35:30 pm
Re: Setting up an instance of TM's DB and web front end
« Reply #19 on: July 09, 2019, 01:39:41 pm »
Fixed. Apparently my CentOS setup was treating 'create_time' as case-sensitive, while Jim's FreeBSD setup was not.
https://github.com/TravelMapping/Web/pull/317
« Last Edit: July 09, 2019, 02:07:24 pm by yakra »