1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 21:15:24 +02:00

moved document meta

This commit is contained in:
Harvey Kandola 2016-11-20 13:41:43 -08:00
parent 877a6b5096
commit 39fcb04604
28 changed files with 859 additions and 836 deletions

View file

@ -206,7 +206,7 @@ func (m *baseManager) DeleteWhere(tx *sqlx.Tx, statement string) (rows int64, er
// Audit inserts a record into the audit table.
func (m *baseManager) Audit(c Context, action, document, page string) {
_, err := Db.Exec("INSERT INTO audit (orgid, userid, documentid, pageid, action) VALUES (?,?,?,?,?)", c.OrgID, c.UserID, document, page, action)
_, err := Db.Exec("INSERT INTO audit (orgid, userid, documentid, pageid, action, created) VALUES (?, ?, ?, ?, ?, ?)", c.OrgID, c.UserID, document, page, action, time.Now().UTC())
if err != nil {
log.Error(fmt.Sprintf("Unable record audit for action %s, user %s, customer %s", action, c.UserID, c.OrgID), err)

View file

@ -101,7 +101,7 @@ func Create(w http.ResponseWriter, r *http.Request) {
Password: r.Form.Get("password"),
Firstname: r.Form.Get("firstname"),
Lastname: r.Form.Get("lastname"),
Revised: time.Now(),
Revised: time.Now().UTC(),
}
if details.Company == "" ||

View file

@ -240,7 +240,7 @@ CREATE TABLE IF NOT EXISTS `revision` (
`pageid` CHAR(16) NOT NULL COLLATE utf8_bin,
`userid` CHAR(16) NOT NULL COLLATE utf8_bin,
`contenttype` CHAR(20) NOT NULL DEFAULT 'wysiwyg',
`pagetype` CHAR(10) NOT NULL DEFAULT 'section',
`pagetype` CHAR(10) NOT NULL DEFAULT 'section',
`title` NVARCHAR(2000) NOT NULL,
`body` LONGTEXT,
`rawbody` LONGBLOB,
@ -334,3 +334,19 @@ CREATE TABLE IF NOT EXISTS `link` (
CONSTRAINT pk_id PRIMARY KEY (id))
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
ENGINE = InnoDB;
DROP TABLE IF EXISTS `participant`;
CREATE TABLE IF NOT EXISTS `participant` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`refid` CHAR(16) NOT NULL COLLATE utf8_bin,
`orgid` CHAR(16) NOT NULL COLLATE utf8_bin,
`documentid` CHAR(16) NOT NULL COLLATE utf8_bin,
`userid` CHAR(16) DEFAULT '' COLLATE utf8_bin,
`roletype` CHAR(1) NOT NULL DEFAULT 'I' COLLATE utf8_bin,
`lastviewed` TIMESTAMP NULL,
`created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT pk_id PRIMARY KEY (id),
INDEX `idx_participant_documentid` (`documentid` ASC))
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
ENGINE = InnoDB;

View file

@ -0,0 +1,16 @@
/* enterprise edition */
DROP TABLE IF EXISTS `participant`;
CREATE TABLE IF NOT EXISTS `participant` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`refid` CHAR(16) NOT NULL COLLATE utf8_bin,
`orgid` CHAR(16) NOT NULL COLLATE utf8_bin,
`documentid` CHAR(16) NOT NULL COLLATE utf8_bin,
`userid` CHAR(16) DEFAULT '' COLLATE utf8_bin,
`roletype` CHAR(1) NOT NULL DEFAULT 'I' COLLATE utf8_bin,
`lastviewed` TIMESTAMP NULL,
`created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT pk_id PRIMARY KEY (id),
INDEX `idx_participant_documentid` (`documentid` ASC))
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
ENGINE = InnoDB;

View file

@ -26,7 +26,7 @@ type ProdInfo struct {
// Product returns product edition details
func Product() (p ProdInfo) {
p.Major = "0"
p.Minor = "31"
p.Minor = "32"
p.Patch = "0"
p.Version = fmt.Sprintf("%s.%s.%s", p.Major, p.Minor, p.Patch)
p.Edition = "Community"