27 lines
606 B
SQL
27 lines
606 B
SQL
DROP TABLE if exists thumbnails;
|
|
DROP TABLE if exists images;
|
|
create table IF not EXISTS images(
|
|
_id integer PRIMARY KEY,
|
|
_data TEXT,
|
|
_size INTEGER,
|
|
date_added INTEGER,
|
|
title TEXT,
|
|
latitude FLOAT4,
|
|
longitude FLOAT4,
|
|
isprivate INTEGER
|
|
|
|
);
|
|
|
|
create table IF not EXISTS thumbnails (
|
|
_id integer PRIMARY KEY ,
|
|
_data TEXT,
|
|
image_id INTEGER,
|
|
kind INTEGER,
|
|
width INTEGER,
|
|
height INTEGER
|
|
|
|
);
|
|
|
|
\copy images FROM '/data/workspace/myshixun/images.txt' WITH (delimiter',',IGNORE_EXTRA_DATA 'on');
|
|
\copy thumbnails FROM '/data/workspace/myshixun/thumbnails.txt' WITH (delimiter',',IGNORE_EXTRA_DATA 'on');
|