Merge branch 'dev' into custom_fields

This commit is contained in:
Michal Kváček
2016-01-26 21:54:36 +01:00
9 changed files with 23 additions and 45 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ class ActionLog extends Model
protected $fillable = [
'type_id',
'user_id',
'item_id'
'parameters'
];
protected $guarded = [];
+2 -1
View File
@@ -13,7 +13,8 @@ class ActionLogType extends Model
public $timestamps = false;
protected $fillable = [
'name'
'name',
'value'
];
protected $guarded = [];
+3 -3
View File
@@ -15,15 +15,15 @@ class Content extends Model
protected $fillable = [
'user_id',
'module_handler',
'published_from',
'published_to',
'title_photo',
'title',
'url',
'meta_keywords',
'meta_description',
'module_settings',
'content',
'published_from',
'published_to',
'module_settings',
'status'
];
@@ -5,16 +5,17 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Migration
* Class ContentHasCustomField
*/
class Migration extends Model
class ContentHasCustomField extends Model
{
public $timestamps = false;
protected $fillable = [
'migration',
'batch'
'contents_id',
'custom_field_id',
'value'
];
protected $guarded = [];
+1 -1
View File
@@ -13,8 +13,8 @@ class CustomField extends Model
public $timestamps = false;
protected $fillable = [
'handler',
'name',
'type_id',
'description',
'default_value',
'regexp',
+1 -1
View File
@@ -14,7 +14,7 @@ class CustomFieldType extends Model
protected $fillable = [
'name',
'custom_field_id'
'handler'
];
protected $guarded = [];
+1 -2
View File
@@ -14,8 +14,7 @@ class ModuleHasCustomField extends Model
protected $fillable = [
'module_handler',
'custom_field_id',
'value'
'custom_field_id'
];
protected $guarded = [];
-23
View File
@@ -1,23 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class PasswordReset
*/
class PasswordReset extends Model
{
public $timestamps = true;
protected $fillable = [
'email',
'token'
];
protected $guarded = [];
}
+9 -9
View File
@@ -1,5 +1,5 @@
-- MySQL Script generated by MySQL Workbench
-- Út 26. leden 2016, 21:33:51 CET
-- Út 26. leden 2016, 21:53:01 CET
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
@@ -45,7 +45,7 @@ ENGINE = InnoDB;
-- Table `files`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `files` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`user_id` INT NOT NULL COMMENT 'User, who uploaded this file',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`filename` VARCHAR(128) NOT NULL,
@@ -66,7 +66,7 @@ COMMENT = 'Table containing files which were uploaded into system.';
-- Table `contents`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `contents` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`user_id` INT NOT NULL,
`module_handler` VARCHAR(255) NOT NULL,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -111,7 +111,7 @@ COMMENT = 'Table with all content pages.';
-- Table `content_history`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `content_history` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`user_id` INT NOT NULL,
`content_id` INT NOT NULL,
`changed_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -154,7 +154,7 @@ COMMENT = 'Widget type table contains information about all installed widgets. T
-- Table `widgets`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `widgets` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`widget_type_handler` VARCHAR(255) NOT NULL,
`user_id` INT NOT NULL COMMENT 'User ID who created this widget',
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -223,7 +223,7 @@ ENGINE = InnoDB;
-- Table `custom_field_types`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `custom_field_types` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(64) NOT NULL COMMENT 'Name of custom field. Given as a translation string (e.g. as dir/section.translation)',
`handler` VARCHAR(255) NOT NULL COMMENT 'Class for handling this type of custom field',
PRIMARY KEY (`id`),
@@ -237,7 +237,7 @@ COMMENT = 'List of all custom field types.';
-- Table `custom_fields`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `custom_fields` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`type_id` INT NOT NULL COMMENT 'Foreign key to custom_field_types table',
`description` MEDIUMTEXT NULL DEFAULT NULL COMMENT 'Description used for detailed information about meaning of given custom field',
@@ -307,7 +307,7 @@ COMMENT = 'Table used for assigning different custom fields to different modules
-- Table `action_log_types`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `action_log_types` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL,
`value` VARCHAR(128) NOT NULL COMMENT 'Log content - represented as translation string.',
PRIMARY KEY (`id`))
@@ -319,7 +319,7 @@ COMMENT = 'List of all types which can be logged.';
-- Table `action_log`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `action_log` (
`id` INT NOT NULL,
`id` INT NOT NULL AUTO_INCREMENT,
`type_id` INT NOT NULL,
`user_id` INT NOT NULL,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,