Browse Source

Create schema.sql

pull/5/head
Aaron Parecki 7 years ago
committed by GitHub
parent
commit
28d4b0f602
1 changed files with 43 additions and 0 deletions
  1. +43
    -0
      compass/database/schema.sql

+ 43
- 0
compass/database/schema.sql View File

@ -0,0 +1,43 @@
CREATE TABLE `database_users` (
`database_id` int(11) unsigned NOT NULL,
`user_id` int(11) NOT NULL DEFAULT '0',
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`database_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `databases` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
`read_token` varchar(255) DEFAULT NULL,
`write_token` varchar(255) DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`micropub_endpoint` varchar(255) NOT NULL,
`micropub_token` varchar(1024) NOT NULL,
`ping_urls` varchar(1024) NOT NULL,
PRIMARY KEY (`id`),
KEY `read_token` (`read_token`),
KEY `write_token` (`write_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `failed_jobs` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`connection` text COLLATE utf8_unicode_ci NOT NULL,
`queue` text COLLATE utf8_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`url` varchar(255) NOT NULL DEFAULT '',
`created_at` datetime DEFAULT NULL,
`last_login` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Loading…
Cancel
Save