Public feed #531372

Anonymous

public sql v1 · immutable
Raw Edit
·published 2007-06-02 13:46 UTC
rendered paste body
drop database if exists `shorturl`;create database if not exists `shorturl`;use `shorturl`;SET FOREIGN_KEY_CHECKS=0;-- Drop table last_cleandrop table if exists `last_clean`;create table `last_clean` (  `clean_date` datetime)engine=myisamrow_format=default;-- Drop table linkdrop table if exists `link`;create table `link` (  `id` int(11) unsigned not null auto_increment,  `link` int(11) not null,  `expire` int(11) unsigned not null,  primary key(`id`),  unique index `idx_link`(`link`))engine=innodb;-- Drop table urlsdrop table if exists `urls`;create table `urls` (  `id` int(11) unsigned not null auto_increment,  `url` text,  `post_date` int(11) unsigned not null,  primary key(`id`),  constraint `rel` foreign key (`id`)    references `link`(`id`)    on delete no action    on update no action)engine=innodb;SET FOREIGN_KEY_CHECKS=1;