This repository has been archived by the owner on Jan 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.sql
81 lines (55 loc) · 2.62 KB
/
test.sql
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* Test database for Database Filler.
*
* Includes a variety of MySQL datatypes and several formatting quirks.
* Created for MySQL 5.x
*
* @author Martin Latter
* @copyright Martin Latter 13/12/2014
* @version 0.06
* @license GNU GPL version 3.0 (GPL v3); http://www.gnu.org/licenses/gpl.html
* @link https://github.com/Tinram/Database-Filler.git
*/
CREATE DATABASE IF NOT EXISTS dbfilltest CHARACTER SET utf8 COLLATE utf8_general_ci;
USE dbfilltest;
CREATE TABLE IF NOT EXISTS `test_datatypes`
(
`td_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`sku` CHAR(20) NOT NULL,
`EAN` CHAR(13) DEFAULT NULL,
`huge_quantity` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`quantity` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`med_quantity` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
`small_quantity` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
`tiny_quantity` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
`negative_quantity` INT(10) NOT NULL DEFAULT 0,
`price` DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
`val_float` FLOAT(20, 2) NOT NULL DEFAULT 0.00,
`val_double` DOUBLE(40, 4) NOT NULL DEFAULT 0.0000 COMMENT 'normal schema comment',
`enumerator` ENUM('a', 'b', 'c', 'd'),
`flag` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`code` CHAR(2) NOT NULL DEFAULT '' , -- deliberate whitespace
`notes` VARCHAR(255) NOT NULL DEFAULT '',
`tinytxt` TINYTEXT COMMENT "badly placed schema comment" NOT NULL,
`added_date` DATE NOT NULL,
`added_dtime` DATETIME NOT NULL,
`added_time` TIME NOT NULL,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
KEY `flag` (`flag`),
PRIMARY KEY (`td_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `logger`
(
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`message` VARCHAR(255) NOT NULL,
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `logger2`
(
`logger2_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`counter` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
`message` VARCHAR(255) NOT NULL,
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`logger2_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;