-- ------------------------------------------------
-- Calendar helper table
-- Created 20120719
-- ------------------------------------------------

CREATE TABLE IF NOT EXISTS `calendar` (
  `date` date NOT NULL
) ENGINE=InnoDB;

--CREATE PROCEDURE fill_calendar()
--BEGIN
--  DECLARE crt_date DATE;;
--  SET crt_date=date_sub(now(), INTERVAL 2 YEAR);;
--  WHILE crt_date < DATE('2099-12-31') DO
--    INSERT INTO calendar VALUES(crt_date);;
--    SET crt_date = ADDDATE(crt_date, INTERVAL 1 DAY);;
--  END WHILE;;
--END;

--CALL fill_calendar();
