· 7 years ago · Dec 29, 2018, 09:06 AM
12016/01/18 12:36:56 - Insert / Update.0 - ERROR: column "subject_classification" is of type subject_classification_type but expression is of type character varying
22016/01/18 12:36:56 - Insert / Update.0 - Hint: You will need to rewrite or cast the expression.
32016/01/18 12:36:56 - Insert / Update.0 - Position: 166
4
5CREATE TABLE subject (
6 subject_id bigint NOT NULL,
7 created_at timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL,
8 updated_at timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL,
9 code character varying(2000) NOT NULL,
10 display_code character varying(2000) NOT NULL,
11 subject_classification subject_classification_type NOT NULL,
12 );
13
14
15 CREATE TYPE subject_classification_type AS ENUM (
16 'Math',
17 'Social Science',
18 'Language Arts'
19);
20
21create type suser as enum ('admin', 'user' , 'staff');
22drop table if exists user_login;
23create table user_login(
24 id serial primary key,
25 who_logged suser,
26 when_logged timestamp default CURRENT_TIMESTAMP
27);