     change_time DATETIME NOT NULL,
     change_by INTEGER NOT NULL,
     PRIMARY KEY(id),
-    UNIQUE ticket_state_name (name)
+    CONSTRAINT ticket_state_name UNIQUE (name)
 );
 -- ----------------------------------------------------------
 --  create table ticket_state_type

    change_time DATETIME NOT NULL,
    change_by INTEGER NOT NULL,
    PRIMARY KEY(id),
    UNIQUE users_login (login)
);
-- ----------------------------------------------------------
--  create table user_preferences

    change_time DATETIME NOT NULL,
    change_by INTEGER NOT NULL,
    PRIMARY KEY(id),
    CONSTRAINT valid_name UNIQUE (name)
);
-- ----------------------------------------------------------
--  create table ticket_priority
