- Adds new "hash" column to the newsletters table

- Updates newsletter model to automatically generate hash when saving
  newsletter
- Adds new getByHash method to the newsletter model
This commit is contained in:
Vlad
2016-12-08 20:11:51 -05:00
parent eee22227b3
commit 9ac4c3de72
2 changed files with 21 additions and 2 deletions

View File

@@ -177,6 +177,7 @@ class Migrator {
function newsletters() {
$attributes = array(
'id mediumint(9) NOT NULL AUTO_INCREMENT,',
'hash varchar(150) NULL DEFAULT NULL,',
'parent_id mediumint(9) NULL,',
'subject varchar(250) NOT NULL DEFAULT "",',
'type varchar(20) NOT NULL DEFAULT "standard",',