~ubuntu-branches/ubuntu/trusty/ginkgocadx/trusty

« back to all changes in this revision

Viewing changes to src/cadxcore/sqlite/ginkgosqlite.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: package-import@ubuntu.com-20130721115853-44e7n1xujqglu78e
Tags: 3.4.0.928.29+dfsg-1
* New upstream release [July 2013]
  + new B-D: "libjsoncpp-dev".
  + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
    "libjsoncpp-dev".
  + new patch "fix-wx.patch" to avoid FTBFS due to missing
    "-lwx_gtk2u_html-2.8".
* Removed unnecessary versioned Build-Depends.
* Removed obsolete lintian override.
* Reference get-orig-source implementation for orig.tar clean-up and
  DFSG-repackaging.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#endif
22
22
 
23
23
//version of ginkgo bbdd
24
 
#define GINKGO_BBDD_VERSION 6
 
24
#define GINKGO_BBDD_VERSION 7
25
25
 
26
26
//#define _GINKGO_TRACE
27
27
 
75
75
        sentencia << wxT("cuids_in_study VARCHAR(250),");
76
76
        sentencia << wxT("num_series INTEGER,");
77
77
        sentencia << wxT("num_instances INTEGER,");
 
78
        sentencia << wxT("location CHAR DEFAULT 'B',"); //B implies fully local L implies some files linked W implies some files wado linked
78
79
        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
79
80
        sentencia << wxT("updated_time DATETIME);");
80
81
        dataBase.ExecuteUpdate(sentencia);
145
146
        sentencia << wxT("num_instances INTEGER,");
146
147
        sentencia << wxT("frame_of_reference_uid VARCHAR(250),");
147
148
        sentencia << wxT("tuids_in_series VARCHAR(250),");
 
149
        sentencia << wxT("location CHAR DEFAULT 'B',"); //B implies fully local L implies some files linked W implies some files wado linked
148
150
        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
149
151
        sentencia << wxT("updated_time DATETIME);");
150
152
        dataBase.ExecuteUpdate(sentencia);
200
202
        sentencia << wxT("ON Series(station_name);");
201
203
        dataBase.ExecuteUpdate(sentencia);
202
204
 
 
205
        sentencia = wxEmptyString;
 
206
        sentencia << wxT("CREATE Index series_study ");
 
207
        sentencia << wxT("ON Series(pk, study_fk);");
 
208
        dataBase.ExecuteUpdate(sentencia);
 
209
 
 
210
 
 
211
        sentencia = wxEmptyString;
 
212
        sentencia << wxT("CREATE Index series_location ");
 
213
        sentencia << wxT("ON Series(study_fk, location);");
 
214
        dataBase.ExecuteUpdate(sentencia);
 
215
 
203
216
         /** 1. Tabla de ficheros **/
204
217
        sentencia = wxEmptyString;
205
218
   sentencia << wxT("CREATE TABLE File (");
206
219
        sentencia << wxT("pk INTEGER PRIMARY KEY,"); //autoincrement by default (SQLITE)
207
220
        sentencia << wxT("series_fk INTEGER REFERENCES Series(pk) ON UPDATE CASCADE ON DELETE CASCADE,");
208
221
#ifdef _WIN32
209
 
        sentencia << wxT("file_path VARCHAR(256) COLLATE NOCASE,");
 
222
        sentencia << wxT("file_path VARCHAR(1024) COLLATE NOCASE,");
210
223
#else
211
 
        sentencia << wxT("file_path VARCHAR(256),");
 
224
        sentencia << wxT("file_path VARCHAR(1024),");
212
225
#endif
213
226
        sentencia << wxT("file_sopiuid VARCHAR(240),");
214
227
        sentencia << wxT("file_tsuid VARCHAR(240),");
227
240
        sentencia << wxT("file_desc VARCHAR(240),");
228
241
        sentencia << wxT("spacing VARCHAR(240),");
229
242
        sentencia << wxT("direction_cosines VARCHAR(240),");
 
243
        sentencia << wxT("location CHAR DEFAULT 'B',"); //B implies fully local L implies some files linked W implies some files wado linked
230
244
        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
231
245
        sentencia << wxT("updated_time DATETIME);");
232
246
        dataBase.ExecuteUpdate(sentencia);
270
284
   sentencia << wxT("CREATE Index sopcuid ");
271
285
        sentencia << wxT("ON File(sopcuid);");
272
286
        dataBase.ExecuteUpdate(sentencia);
 
287
        sentencia = wxEmptyString;
 
288
 
 
289
        sentencia = wxEmptyString;
 
290
        sentencia << wxT("CREATE Index file_series ");
 
291
        sentencia << wxT("ON File(pk, series_fk);");
 
292
        dataBase.ExecuteUpdate(sentencia);
 
293
 
 
294
        sentencia = wxEmptyString;
 
295
        sentencia << wxT("CREATE Index file_location ");
 
296
        sentencia << wxT("ON File(series_fk, location);");
 
297
        dataBase.ExecuteUpdate(sentencia);
273
298
 
274
299
        //version table
275
300
        sentencia = wxEmptyString;