File: all_org_ids.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 (12 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
-- Deploy all_org_ids

BEGIN;

ALTER TABLE cookbooks ADD COLUMN organization_id INT NOT NULL DEFAULT 1, DROP INDEX name, ADD UNIQUE INDEX organization_name (organization_id, name);
ALTER TABLE data_bags ADD COLUMN organization_id INT NOT NULL DEFAULT 1, DROP INDEX name, ADD UNIQUE INDEX organization_name (organization_id, name);
ALTER TABLE environments ADD COLUMN organization_id INT NOT NULL DEFAULT 1, DROP INDEX name, ADD UNIQUE INDEX organization_name (organization_id, name);
ALTER TABLE nodes ADD COLUMN organization_id INT NOT NULL DEFAULT 1, DROP INDEX name, ADD UNIQUE INDEX organization_name (organization_id, name);
ALTER TABLE roles ADD COLUMN organization_id INT NOT NULL DEFAULT 1, DROP INDEX name, ADD UNIQUE INDEX organization_name (organization_id, name);
ALTER TABLE sandboxes ADD COLUMN organization_id INT NOT NULL DEFAULT 1, DROP INDEX sbox_id, ADD UNIQUE INDEX organization_sbox (organization_id, sbox_id);

COMMIT;