Skip to content

Commit

Permalink
remove old attributes from Page entity and add unique version key.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed Oct 22, 2018
1 parent 37c4755 commit 40019d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/webiny-api-cms/src/entities/Page.mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@ class PageTable extends MySQLTable {
constructor() {
super();
this.column("createdBy").char(24);
this.column("title").varChar(300);
this.column("slug").varChar(300);
this.column("category").char(24);
this.column("settings").text();
this.column("content").text();
this.column("status").enum("draft", "published", "trash");
this.column("pinned")
.tinyInt(1)
.setDefault(0);
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/webiny-api-cms/src/entities/Revision.mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class RevisionTable extends MySQLTable {
this.column("content").text();
this.column("published").tinyInt();
this.column("locked").tinyInt();

this.index().unique("version", "page");
}
}

Expand Down

0 comments on commit 40019d7

Please sign in to comment.