SQL whitespace
This commit is contained in:
parent
14d395f0ea
commit
e7f9934f03
@ -10,15 +10,15 @@ create temporary view tables as
|
|||||||
|
|
||||||
create temporary view columns as
|
create temporary view columns as
|
||||||
select tables.name as table_name,
|
select tables.name as table_name,
|
||||||
table_info.name as column_name,
|
table_info.name as column_name,
|
||||||
lower(table_info.type) as column_type,
|
lower(table_info.type) as column_type,
|
||||||
"notnull",
|
"notnull",
|
||||||
dflt_value is not null as has_default_value,
|
dflt_value is not null as has_default_value,
|
||||||
ifnull(dflt_value, 0) dflt_value,
|
ifnull(dflt_value, 0) dflt_value,
|
||||||
pk as is_primary_key,
|
pk as is_primary_key,
|
||||||
fk."table" is not null as is_foreign_key,
|
fk."table" is not null as is_foreign_key,
|
||||||
ifnull(fk."table", '') as fk_target_table,
|
ifnull(fk."table", '') as fk_target_table,
|
||||||
ifnull(fk."to", '') as fk_target_column
|
ifnull(fk."to", '') as fk_target_column
|
||||||
from tables
|
from tables
|
||||||
join pragma_table_info(tables.name) as table_info
|
join pragma_table_info(tables.name) as table_info
|
||||||
left join pragma_foreign_key_list(tables.name) as fk on fk."from" = column_name;
|
left join pragma_foreign_key_list(tables.name) as fk on fk."from" = column_name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user