File: db_update_0.8-alpha12_0.8-alpha13_sqlite.sql

package info (click to toggle)
serendipity 1.0.4-1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 14,692 kB
  • ctags: 10,206
  • sloc: php: 83,899; sql: 1,024; sh: 597; makefile: 56
file content (35 lines) | stat: -rw-r--r-- 1,569 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CREATE TABLE {PREFIX}tempimages (
  id {AUTOINCREMENT} {PRIMARY},
  name varchar(255) not null default '',
  extension varchar(5) not null default '',
  mime varchar(255) not null default '',
  size int(11) not null default '0',
  dimensions_width int(11) not null default '0',
  dimensions_height int(11) not null default '0',
  date int(11) not null default '0',
  thumbnail_name varchar(255) not null default '',
  authorid int(11) default '0',
  path text,
  hotlink int(1)
);

INSERT INTO {PREFIX}tempimages (id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path) SELECT id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path FROM {PREFIX}images;
DROP TABLE {PREFIX}images;

CREATE TABLE {PREFIX}images (
  id {AUTOINCREMENT} {PRIMARY},
  name varchar(255) not null default '',
  extension varchar(5) not null default '',
  mime varchar(255) not null default '',
  size int(11) not null default '0',
  dimensions_width int(11) not null default '0',
  dimensions_height int(11) not null default '0',
  date int(11) not null default '0',
  thumbnail_name varchar(255) not null default '',
  authorid int(11) default '0',
  path text,
  hotlink int(1)
);

INSERT INTO {PREFIX}images (id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path) SELECT id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path FROM {PREFIX}tempimages;
DROP TABLE {PREFIX}tempimages;