File: cookbook_versions.sql

package info (click to toggle)
goiardi 0.11.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,708 kB
  • sloc: sql: 4,994; makefile: 156; sh: 95; python: 30
file content (35 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (4)
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
-- Deploy cookbook_versions

BEGIN;

CREATE TABLE cookbook_versions (
	id int not null auto_increment,
	cookbook_id int not null,
	major_ver bigint not null,
	minor_ver bigint not null,
	patch_ver bigint not null default 0, -- the first two *must* be set,
					     -- the third not necessarily. This
					     -- may be better as a nullable
					     -- column though.
	frozen tinyint default 0,
	metadata blob,
	definitions blob,
	libraries blob,
	attributes blob,
	recipes blob,
	providers blob,
	resources blob,
	templates blob,
	root_files blob,
	files blob,
	created_at datetime not null,
	updated_at datetime not null,
	PRIMARY KEY(id),
	UNIQUE KEY(cookbook_id, major_ver, minor_ver, patch_ver),
	FOREIGN KEY (cookbook_id)
		REFERENCES cookbooks(id)
		ON DELETE RESTRICT,
	INDEX(frozen)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

COMMIT;