[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/sql/ -> db_update_1.1-alpha4_1.1-alpha5_sqlite.sql (source)

   1  CREATE TABLE {PREFIX}tempimages (
   2    id {AUTOINCREMENT} {PRIMARY},
   3    name varchar(255) not null default '',
   4    extension varchar(5) not null default '',
   5    mime varchar(255) not null default '',
   6    size int(11) not null default '0',
   7    dimensions_width int(11) not null default '0',
   8    dimensions_height int(11) not null default '0',
   9    date int(11) not null default '0',
  10    thumbnail_name varchar(255) not null default '',
  11    authorid int(11) default '0',
  12    path text,
  13    hotlink int(1),
  14    realname varchar(255) not null default ''
  15  ) {UTF_8};
  16  
  17  INSERT INTO {PREFIX}tempimages (id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path, hotlink) SELECT id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path, hotlink FROM {PREFIX}images;
  18  DROP TABLE {PREFIX}images;
  19  
  20  CREATE TABLE {PREFIX}images (
  21    id {AUTOINCREMENT} {PRIMARY},
  22    name varchar(255) not null default '',
  23    extension varchar(5) not null default '',
  24    mime varchar(255) not null default '',
  25    size int(11) not null default '0',
  26    dimensions_width int(11) not null default '0',
  27    dimensions_height int(11) not null default '0',
  28    date int(11) not null default '0',
  29    thumbnail_name varchar(255) not null default '',
  30    authorid int(11) default '0',
  31    path text,
  32    hotlink int(1),
  33    realname varchar(255) not null default ''
  34  ) {UTF_8};
  35  
  36  CREATE INDEX imagesauthorid_idx ON {PREFIX}images (authorid);
  37  CREATE {FULLTEXT} INDEX pathkey_idx on {PREFIX}images (path);
  38  
  39  INSERT INTO {PREFIX}images (id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path, hotlink) SELECT id, name, extension, mime, size, dimensions_width, dimensions_height, date, thumbnail_name, authorid, path, hotlink FROM {PREFIX}tempimages;
  40  DROP TABLE {PREFIX}tempimages;
  41  
  42  CREATE TABLE {PREFIX}tempreferences (
  43    id {AUTOINCREMENT} {PRIMARY},
  44    entry_id int(10) {UNSIGNED} not null default '0',
  45    link text,
  46    name text,
  47    type varchar(128) not null default ''
  48  ) {UTF_8};
  49  
  50  INSERT INTO {PREFIX}tempreferences (id, entry_id, link, name) SELECT id, entry_id, link, name FROM {PREFIX}references;
  51  DROP TABLE {PREFIX}references;
  52  
  53  CREATE TABLE {PREFIX}references (
  54    id {AUTOINCREMENT} {PRIMARY},
  55    entry_id int(10) {UNSIGNED} not null default '0',
  56    link text,
  57    name text,
  58    type varchar(128) not null default ''
  59  ) {UTF_8};
  60  
  61  CREATE INDEX refentry_idx ON {PREFIX}references (entry_id);
  62  CREATE INDEX reftype_idx ON {PREFIX}references (type);
  63  
  64  INSERT INTO {PREFIX}references (id, entry_id, link, name) SELECT id, entry_id, link, name FROM {PREFIX}tempreferences;
  65  DROP TABLE {PREFIX}tempreferences;


Généré le : Sat Nov 24 09:00:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics