Task37Start - New request header model
See TasksExplained? for more infos about tasks. This task is based on the template at TaskTemplateStart
Status : closed
Category : database
Date opened : 2007-02-19
Description : Replace request header model
Referenced in stories/tasks :
Story12Start
Task43Start
Testsuite : unit/header_test.rb
Commited revision : 127
Remarks :
- The basic request header model developed in Story11Start does not cut it. A new one is needed. Now.
Changelog
2007-02-19 - Removing old migrations
Have to remove the following migrations as they can not be applied in sequence due to memory consumption on development machine.
- 006_add_more_request_fields.rb
- 007_replace_connection_field.rb
2007-02-19 - Create with foreign key
Sqlite does not really support foreign keys properly, that's why there is no
add foreign key statement; it has to be done
within the create statement. As the rails create statement does not support it, the create is issued by hand in migration/009_create_headers.rb.
2007-02-19 - config file
The file
remo_config.rb configures the default headers.
2007-02-19 - Summary of new model
There is a seperate table header:
CREATE TABLE headers (
id INTEGER PRIMARY KEY,
request_id INTEGER NOT NULL,
name STRING NOT NULL,
domain TEXT,
FOREIGN KEY (request_id) REFERENCES request(id) ON DELETE CASCADE);
The name is the name of the headers, the domain is
the regular expression defining the value range for the header.