@golemio/fcd 1.0.9 → 1.0.10-dev.675484084
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dbm;
|
|
4
|
+
var type;
|
|
5
|
+
var seed;
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var Promise;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
+
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
+
*/
|
|
14
|
+
exports.setup = function(options, seedLink) {
|
|
15
|
+
dbm = options.dbmigrate;
|
|
16
|
+
type = dbm.dataType;
|
|
17
|
+
seed = seedLink;
|
|
18
|
+
Promise = options.Promise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.up = function(db) {
|
|
22
|
+
var filePath = path.join(__dirname, 'sqls', '20221024124301-add-tmc-net-up.sql');
|
|
23
|
+
return new Promise( function( resolve, reject ) {
|
|
24
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
+
if (err) return reject(err);
|
|
26
|
+
console.log('received data: ' + data);
|
|
27
|
+
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
.then(function(data) {
|
|
32
|
+
return db.runSql(data);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.down = function(db) {
|
|
37
|
+
var filePath = path.join(__dirname, 'sqls', '20221024124301-add-tmc-net-down.sql');
|
|
38
|
+
return new Promise( function( resolve, reject ) {
|
|
39
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
+
if (err) return reject(err);
|
|
41
|
+
console.log('received data: ' + data);
|
|
42
|
+
|
|
43
|
+
resolve(data);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.then(function(data) {
|
|
47
|
+
return db.runSql(data);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports._meta = {
|
|
52
|
+
"version": 1
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DROP TABLE tmc_ltcze90_roads_wgs84;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
CREATE TABLE tmc_ltcze90_roads_wgs84 (
|
|
2
|
+
geom geometry(MultiLineString,4326),
|
|
3
|
+
cid bigint,
|
|
4
|
+
tabcd bigint,
|
|
5
|
+
lcd bigint PRIMARY KEY,
|
|
6
|
+
class character varying(254),
|
|
7
|
+
tcd bigint,
|
|
8
|
+
stcd bigint,
|
|
9
|
+
roadnumber character varying(254),
|
|
10
|
+
roadname character varying(254),
|
|
11
|
+
firstname character varying(254),
|
|
12
|
+
secondname character varying(254),
|
|
13
|
+
area_ref bigint,
|
|
14
|
+
area_name character varying(254)
|
|
15
|
+
);
|
|
16
|
+
COMMENT ON TABLE tmc_ltcze90_roads_wgs84 IS 'Data for this table are imported manually. Purpose of this table is to show static TMC road net in app Praha Dopravni.';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/fcd",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10-dev.675484084",
|
|
4
4
|
"description": "Golemio Floating Car Data Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"mpath": "^0.8.4",
|
|
77
77
|
"minimist": "^1.2.6",
|
|
78
78
|
"follow-redirects": "1.14.7",
|
|
79
|
-
"xsd2jsonschema/urijs": "^1.19.10"
|
|
79
|
+
"xsd2jsonschema/urijs": "^1.19.10",
|
|
80
|
+
"minimatch": "^3.0.5"
|
|
80
81
|
}
|
|
81
82
|
}
|