Skip to content

Commit a15833d

Browse files
committed
Python: DB upgrade script for default-indexing change
Follow this excellent guide: https://github.com/github/codeql-c-extractor-team/blob/master/docs/db-upgrade.md
1 parent 16e9d76 commit a15833d

File tree

5 files changed

+2116
-6
lines changed

5 files changed

+2116
-6
lines changed

python/ql/src/semmlecode.python.dbscheme

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
* by adding rules to dbscheme.template
66
*/
77

8+
/* This is a dummy line to alter the dbscheme, so we can make a database upgrade
9+
* 2020-05-04
10+
*/
11+
812
/*
913
* External artifacts
1014
*/
@@ -126,7 +130,7 @@ containerparent(int parent: @container ref,
126130
unique int child: @container ref);
127131

128132
@sourceline = @file | @py_Module | @xmllocatable;
129-
133+
130134
numlines(int element_id: @sourceline ref,
131135
int num_lines: int ref,
132136
int num_code: int ref,
@@ -922,7 +926,7 @@ ext_rettype(int funcid : @py_object ref,
922926
ext_proptype(int propid : @py_object ref,
923927
int typeid : @py_object ref);
924928

925-
ext_argreturn(int funcid : @py_object ref,
929+
ext_argreturn(int funcid : @py_object ref,
926930
int arg : int ref);
927931

928932
py_special_objects(unique int obj : @py_cobject ref,
@@ -935,15 +939,15 @@ py_decorated_object(int object : @py_object ref,
935939

936940
@py_source_element = @py_ast_node | @container;
937941

938-
/* XML Files */
942+
/* XML Files */
939943

940944
xmlEncoding (unique int id: @file ref, varchar(900) encoding: string ref);
941945

942946
xmlDTDs (unique int id: @xmldtd,
943947
varchar(900) root: string ref,
944948
varchar(900) publicId: string ref,
945949
varchar(900) systemId: string ref,
946-
int fileid: @file ref);
950+
int fileid: @file ref);
947951

948952
xmlElements (unique int id: @xmlelement,
949953
varchar(900) name: string ref,
@@ -958,7 +962,7 @@ xmlAttrs (unique int id: @xmlattribute,
958962
int idx: int ref,
959963
int fileid: @file ref);
960964

961-
xmlNs (int id: @xmlnamespace,
965+
xmlNs (int id: @xmlnamespace,
962966
varchar(900) prefixName: string ref,
963967
varchar(900) URI: string ref,
964968
int fileid: @file ref);
@@ -970,7 +974,7 @@ xmlHasNs (int elementId: @xmlnamespaceable ref,
970974
xmlComments (unique int id: @xmlcomment,
971975
varchar(3600) text: string ref,
972976
int parentid: @xmlparent ref,
973-
int fileid: @file ref);
977+
int fileid: @file ref);
974978

975979
xmlChars (unique int id: @xmlcharacters,
976980
varchar(3600) text: string ref,

0 commit comments

Comments
 (0)