Personal tools
You are here: Home CinnamonServer Upgrade upgrade v1.0.3

upgrade v1.0.3

How to upgrade the Cinnamon server from version 1.0.2 to 1.0.3

Reducing log file spam

The configuration file lucene.properties now has an optional entry "logModulus" which is how many times the IndexServer thread (which runs every five seconds by default) should skip it's non-critical debugging log output. It is intended to prevent log files from growing too large. Note that you can also silence the IndexServer completely by editing the logback.xml configuration file.

Example:

# send only output of every fifth run to the log file:
logModulus=5

Life cycles

Cinnamon version 1.0.3 introduces the life cycles for objects. This requires some changes to existing repositories.

Add table lifecycles

--- Postgresql:

CREATE TABLE lifecycles
(
  id bigint NOT NULL,
  "name" character varying(128) NOT NULL,
  default_state_id bigint,
  CONSTRAINT lifecycles_pkey PRIMARY KEY (id),
  CONSTRAINT fkd1620649b3d60a9d FOREIGN KEY (default_state_id)
      REFERENCES lifecycle_states (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT lifecycles_name_key UNIQUE (name)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE lifecycles OWNER TO cinnamon;

 

Add table lifecycle_states

--- Postgresql:
CREATE TABLE lifecycle_states
(
  id bigint NOT NULL,
  "name" character varying(128) NOT NULL,
  parameter text NOT NULL,
  state_class character varying(128) NOT NULL,
  lifecycle_id bigint NOT NULL,
  lifecycle_state_id bigint,
  CONSTRAINT lifecycle_states_pkey PRIMARY KEY (id),
  CONSTRAINT fke3bd9877407f648b FOREIGN KEY (lifecycle_id)
      REFERENCES lifecycles (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT lifecycle_states_name_key UNIQUE (name)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE lifecycle_states OWNER TO cinnamon;

 

Update objects table

Add a column lifecycle_state_id (bigint, default:null) to the objects table. An object starts without a life cycle state, but you can attach one.

Update cinnamon_config.xml

If you want to use life cycles in Cinnamon, please add the apiClass for this feature to the configuration file where appropriate:

<apiClass>server.extension.LifeCycleApi</apiClass>

Upgrade script

--- for PostgreSQL:

CREATE TABLE lifecycles
(
  id bigint NOT NULL,
  "name" character varying(128) NOT NULL,
  default_state_id bigint,
  CONSTRAINT lifecycles_pkey PRIMARY KEY (id),
  CONSTRAINT lifecycles_name_key UNIQUE (name)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE lifecycles OWNER TO cinnamon;

CREATE TABLE lifecycle_states
(
  id bigint NOT NULL,
  "name" character varying(128) NOT NULL,
  parameter text NOT NULL,
  state_class character varying(128) NOT NULL,
  lifecycle_id bigint NOT NULL,
  CONSTRAINT lifecycle_states_pkey PRIMARY KEY (id),
  CONSTRAINT lifecycle_states_name_key UNIQUE (name)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE lifecycle_states OWNER TO cinnamon;

alter table lifecycles add constraint fkd1620649b3d60a9d FOREIGN KEY (default_state_id) 
  REFERENCES lifecycle_states (id) MATCH SIMPLE       ON UPDATE NO ACTION ON DELETE NO ACTION;
alter table lifecycle_states add constraint  fke3bd9877407f648b FOREIGN KEY (lifecycle_id)  
  REFERENCES lifecycles (id) MATCH SIMPLE       ON UPDATE NO ACTION ON DELETE NO ACTION;

alter table objects add column lifecycle_state_id bigint;
alter table objects add constraint lifecycle_state foreign key (lifecycle_state_id)
 references lifecycle_states(id) MATCH SIMPLE
 ON UPDATE NO ACTION ON DELETE NO ACTION;

 

Document Actions