albertborsos/yii2-historizer

Yii2 Model Historizer Extension

1.1.1 2015-04-07 08:58 UTC

This package is auto-updated.

Last update: 2024-04-08 07:00:36 UTC


README

Yii2 Model Historizer Extension

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist albertborsos/yii2-historizer "*"

or add

"albertborsos/yii2-historizer": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \albertborsos\yii2historizer\AutoloadExample::widget(); ?>

Init

CREATE TABLE IF NOT EXISTS `ext_historizer_archives` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `model_class` varchar(512) NOT NULL,
  `model_id` int(11) NOT NULL,
  `model_attributes` text NOT NULL,
  `created_at` INT NOT NULL,
  `created_user` INT NOT NULL,
  `updated_at` INT NOT NULL,
  `updated_user` INT NOT NULL,
  `status` varchar(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;