forked from fedora-infra/fedocal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.sql
30 lines (22 loc) · 1021 Bytes
/
update.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
-- Sometime the database scheme from fedocal is changing
-- This file tries to track down these changes allowing you to keep
-- you database structure.
-- However, this file is intended temporarily for development purposes
-- until a better solution can be found (such as using Alembic).
-- Use at your own risk -- Data may be lost
USE fedocal;
-- 2012/11/01
ALTER TABLE `calendars` ADD calendar_regional_meetings tinyint(1) DEFAULT NULL;
ALTER TABLE `meetings` ADD meeting_region varchar(10) DEFAULT NULL;
-- 2012/11/05 - Change the Meetings table and drop the recursion table
ALTER TABLE `meetings` ADD recursion_frequency Integer DEFAULT NULL;
ALTER TABLE `meetings` ADD recursion_ends Date DEFAULT NULL;
-- the foreign key name might change, see "SHOW CREATE TABLE meetings;"
-- to be sure
ALTER TABLE `meetings` DROP FOREIGN KEY `meetings_ibfk_3`;
ALTER TABLE `meetings` DROP COLUMN `recursion_id`;
DROP TABLE `recursivity`;
-- Check the changes:
SHOW TABLES ;
SHOW CREATE TABLE meetings;
DESCRIBE meetings;