Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 2 additions & 45 deletions sql/000_ht_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,15 @@ CREATE TABLE `attributes` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=28;


-- In production ht this is a derivative view
-- Is this actually used anywhere?
DROP TABLE IF EXISTS `collection_names`;
CREATE TABLE `collection_names` (
`collection` varchar(16) NOT NULL,
`coalesce(mapto_name,name)` varchar(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `ht_approval_requests`;
CREATE TABLE `ht_approval_requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`approver` varchar(255) DEFAULT NULL,
`userid` varchar(255) DEFAULT NULL,
`sent` timestamp NULL DEFAULT NULL,
`received` timestamp NULL DEFAULT NULL,
`renewed` timestamp NULL DEFAULT NULL,
`token_hash` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `ht_billing_members`;
CREATE TABLE `ht_billing_members` (
`inst_id` varchar(32) NOT NULL,
Expand Down Expand Up @@ -129,7 +119,6 @@ CREATE TABLE `ht_institutions` (
`inst_id` varchar(64) PRIMARY KEY NOT NULL,
`grin_instance` varchar(8) DEFAULT NULL,
`name` varchar(256) DEFAULT NULL,
`template` varchar(256) DEFAULT NULL,
`domain` varchar(32) DEFAULT NULL,
`us` tinyint(1) NOT NULL DEFAULT 0,
`mapto_inst_id` varchar(32) DEFAULT NULL,
Expand All @@ -154,38 +143,6 @@ CREATE TABLE `ht_namespaces` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `ht_proxies`;
CREATE TABLE `ht_proxies` (
`host` varchar(64) NOT NULL,
`ip` varchar(16) NOT NULL,
`time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `ht_logs`;
CREATE TABLE `ht_logs` (
`model` varchar(255) DEFAULT NULL,
`objid` varchar(255) DEFAULT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`data` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `ht_contacts`;
CREATE TABLE `ht_contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`inst_id` varchar(64) NOT NULL,
`contact_type` int(11) NOT NULL,
`email` varchar(256) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `ht_contact_types`;
CREATE TABLE `ht_contact_types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(256) NOT NULL,
`description` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `ht_users`;
CREATE TABLE `ht_users` (
`userid` varchar(256) NOT NULL,
Expand Down
8 changes: 0 additions & 8 deletions sql/009_ht_proxies.sql

This file was deleted.

Loading