<select id="selectByKey" parameterType="map" resultType="Log">
SELECT
l.payload_field as "payload",
- l.time_field as "time",
+ l.created_at as "time",
l.execution_time_field as "executionTime",
- l.author_field as "author",
+ l.user_login as "author",
l.data_field as "data"
FROM logs l
WHERE l.time_field=#{key.time}
CREATE TABLE "LOGS" (
- "TIME_FIELD" TIMESTAMP,
+ "CREATED_AT" TIMESTAMP,
"EXECUTION_TIME_FIELD" LONG,
- "AUTHOR_FIELD" VARCHAR(30),
+ "USER_LOGIN" VARCHAR(30),
"PAYLOAD_FIELD" VARCHAR(250),
"DATA_FIELD" CLOB(2147483647)
);
def self.up
create_table 'logs'do |t|
- t.column 'time_field', :datetime, :null => false
- t.column 'execution_time_field', :long
- t.column 'author_field', :string
- t.column 'data_field', :blob
+ t.column 'created_at', :datetime, :null => false
+ t.column 'execution_time_field', :int
+ t.column 'user_login', :string
+ t.column 'data_field', :text
t.column 'payload_field', :string
end