Skip to content

Commit

Permalink
Drop start & frequency columns
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Jul 11, 2023
1 parent e784c14 commit 20a7e0a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions library/Reporting/Model/Schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ public function getColumns()
return [
'report_id',
'author',
'start',
'frequency',
'action',
'config',
'ctime',
Expand All @@ -38,7 +36,6 @@ public function getColumns()
public function createBehaviors(Behaviors $behaviors)
{
$behaviors->add(new MillisecondTimestamp([
'start',
'ctime',
'mtime'
]));
Expand Down
3 changes: 3 additions & 0 deletions schema/mysql-upgrades/1.0.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE schedule
DROP COLUMN IF EXISTS start,
DROP COLUMN IF EXISTS frequency;
2 changes: 0 additions & 2 deletions schema/mysql.schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ CREATE TABLE schedule (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
report_id int(10) unsigned NOT NULL,
author varchar(255) NOT NULL COLLATE utf8mb4_unicode_ci,
start bigint(20) unsigned NOT NULL,
frequency enum('minutely', 'hourly', 'daily', 'weekly', 'monthly'),
action varchar(255) NOT NULL,
config text NULL DEFAULT NULL,
ctime bigint(20) unsigned NOT NULL,
Expand Down
3 changes: 3 additions & 0 deletions schema/pgsql-upgrades/1.0.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE schedule
DROP COLUMN IF EXISTS start,
DROP COLUMN IF EXISTS frequency;
4 changes: 0 additions & 4 deletions schema/pgsql.schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ CREATE OR REPLACE FUNCTION unix_timestamp(timestamp with time zone DEFAULT NOW()
AS 'SELECT EXTRACT(EPOCH FROM $1)::bigint'
LANGUAGE SQL;

CREATE TYPE frequency AS ENUM ('minutely', 'hourly', 'daily', 'weekly', 'monthly');

CREATE TABLE template (
id serial PRIMARY KEY,
author varchar(255) NOT NULL,
Expand Down Expand Up @@ -73,8 +71,6 @@ CREATE TABLE schedule (
id serial PRIMARY KEY,
report_id int NOT NULL,
author varchar(255) NOT NULL,
start bigint NOT NULL,
frequency frequency,
action varchar(255) NOT NULL,
config text DEFAULT NULL,
ctime bigint NOT NULL DEFAULT unix_timestamp() * 1000,
Expand Down

0 comments on commit 20a7e0a

Please sign in to comment.