[anjuta] symbol-db: using text instead of varchar on tables.sql
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: using text instead of varchar on tables.sql
- Date: Wed, 21 Apr 2010 21:52:41 +0000 (UTC)
commit 337b114ae8039ad1e66b592dc769fa47b2785b20
Author: Massimo Corà <mcora src gnome org>
Date: Wed Apr 21 00:34:54 2010 +0200
symbol-db: using text instead of varchar on tables.sql
varchar keyword is useless in sqlite, so it's better to use text.
plugins/symbol-db/tables.sql | 62 +++++++++++++++++++++---------------------
1 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/plugins/symbol-db/tables.sql b/plugins/symbol-db/tables.sql
index 4560078..707d248 100644
--- a/plugins/symbol-db/tables.sql
+++ b/plugins/symbol-db/tables.sql
@@ -4,20 +4,20 @@
DROP TABLE IF EXISTS workspace;
CREATE TABLE workspace (workspace_id integer PRIMARY KEY AUTOINCREMENT,
- workspace_name varchar (50) not null unique,
- analyse_time DATE
+ workspace_name text not null unique,
+ analyse_time date
);
DROP TABLE IF EXISTS project;
CREATE TABLE project (project_id integer PRIMARY KEY AUTOINCREMENT,
- project_name varchar (50) not null unique,
+ project_name text not null unique,
wrkspace_id integer REFERENCES workspace (workspace_id),
- analyse_time DATE
+ analyse_time date
);
DROP TABLE IF EXISTS file_include;
CREATE TABLE file_include (file_include_id integer PRIMARY KEY AUTOINCREMENT,
- file_include_type varchar (10) not null unique
+ file_include_type text not null unique
);
DROP TABLE IF EXISTS ext_include;
@@ -28,7 +28,7 @@ CREATE TABLE ext_include (prj_id integer REFERENCES project (project_id),
DROP TABLE IF EXISTS file_ignore;
CREATE TABLE file_ignore (file_ignore_id integer PRIMARY KEY AUTOINCREMENT,
- file_ignore_type varchar (10) unique
+ file_ignore_type text unique
);
DROP TABLE IF EXISTS ext_ignore;
@@ -39,24 +39,24 @@ CREATE TABLE ext_ignore (prj_id integer REFERENCES project (project_id),
DROP TABLE IF EXISTS file;
CREATE TABLE file (file_id integer PRIMARY KEY AUTOINCREMENT,
- file_path TEXT not null unique,
+ file_path text not null unique,
prj_id integer REFERENCES project (projec_id),
lang_id integer REFERENCES language (language_id),
- analyse_time DATE
+ analyse_time date
);
DROP TABLE IF EXISTS language;
CREATE TABLE language (language_id integer PRIMARY KEY AUTOINCREMENT,
- language_name varchar (50) not null unique);
+ language_name text not null unique);
DROP TABLE IF EXISTS symbol;
CREATE TABLE symbol (symbol_id integer PRIMARY KEY AUTOINCREMENT,
file_defined_id integer not null REFERENCES file (file_id),
- name varchar (256) not null,
+ name text not null,
file_position integer,
is_file_scope integer,
- signature varchar (256),
- returntype varchar (256),
+ signature text,
+ returntype text,
scope_definition_id integer,
scope_id integer,
type_id integer REFERENCES sym_type (type_id),
@@ -69,24 +69,24 @@ CREATE TABLE symbol (symbol_id integer PRIMARY KEY AUTOINCREMENT,
DROP TABLE IF EXISTS sym_type;
CREATE TABLE sym_type (type_id integer PRIMARY KEY AUTOINCREMENT,
- type_type varchar (256) not null,
- type_name varchar (256) not null,
+ type_type text not null,
+ type_name text not null,
unique (type_type, type_name)
);
DROP TABLE IF EXISTS sym_kind;
CREATE TABLE sym_kind (sym_kind_id integer PRIMARY KEY AUTOINCREMENT,
- kind_name varchar (50) not null unique
+ kind_name text not null unique
);
DROP TABLE IF EXISTS sym_access;
CREATE TABLE sym_access (access_kind_id integer PRIMARY KEY AUTOINCREMENT,
- access_name varchar (50) not null unique
+ access_name text not null unique
);
DROP TABLE IF EXISTS sym_implementation;
CREATE TABLE sym_implementation (sym_impl_id integer PRIMARY KEY AUTOINCREMENT,
- implementation_name varchar (50) not null unique
+ implementation_name text not null unique
);
DROP TABLE IF EXISTS heritage;
@@ -97,7 +97,7 @@ CREATE TABLE heritage (symbol_id_base integer REFERENCES symbol (symbol_id),
DROP TABLE IF EXISTS scope;
CREATE TABLE scope (scope_id integer PRIMARY KEY AUTOINCREMENT,
- scope_name varchar(256) not null,
+ scope_name text not null,
type_id integer,
unique (scope_name, type_id)
);
@@ -108,13 +108,13 @@ CREATE TABLE version (sdb_version numeric PRIMARY KEY);
DROP TABLE IF EXISTS __tmp_heritage_scope;
CREATE TABLE __tmp_heritage_scope (tmp_heritage_scope_id integer PRIMARY KEY AUTOINCREMENT,
symbol_referer_id integer not null,
- field_inherits varchar(256),
- field_struct varchar(256),
- field_typeref varchar(256),
- field_enum varchar(256),
- field_union varchar(256),
- field_class varchar(256),
- field_namespace varchar(256)
+ field_inherits text,
+ field_struct text,
+ field_typeref text,
+ field_enum text,
+ field_union text,
+ field_class text,
+ field_namespace text
);
DROP TABLE IF EXISTS __tmp_removed;
@@ -122,14 +122,14 @@ CREATE TABLE __tmp_removed (tmp_removed_id integer PRIMARY KEY AUTOINCREMENT,
symbol_removed_id integer not null
);
-DROP INDEX IF EXISTS symbol_idx_3;
-CREATE INDEX symbol_idx_3 ON symbol (name, file_defined_id, type_id);
+DROP INDEX IF EXISTS symbol_idx_1;
+CREATE INDEX symbol_idx_1 ON symbol (name, file_defined_id, type_id);
-DROP INDEX IF EXISTS symbol_idx_4;
-CREATE INDEX symbol_idx_4 ON symbol (scope_id);
+DROP INDEX IF EXISTS symbol_idx_2;
+CREATE INDEX symbol_idx_2 ON symbol (scope_id);
-DROP INDEX IF EXISTS symbol_idx_5;
-CREATE INDEX symbol_idx_5 ON symbol (type_id);
+DROP INDEX IF EXISTS symbol_idx_3;
+CREATE INDEX symbol_idx_3 ON symbol (type_id);
DROP TRIGGER IF EXISTS delete_file_trg;
CREATE TRIGGER delete_file_trg BEFORE DELETE ON file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]