Hi, Guys
This is about internationalization.
According to CDbMessageSource
We have this table structure.
CREATE TABLE SourceMessage
(
id INTEGER PRIMARY KEY,
category VARCHAR(32),
message TEXT
);
CREATE TABLE Message
(
id INTEGER,
language VARCHAR(16),
translation TEXT,
PRIMARY KEY (id, language),
CONSTRAINT FK_Message_SourceMessage FOREIGN KEY (id)
REFERENCES SourceMessage (id) ON DELETE CASCADE ON UPDATE RESTRICT
);
From what I’ve read we can do only change the table name via property
sourceMessageTable
and
translatedMessageTable
.
So what I want to ask are.
1. Can we change the field name of each table?
For example : I want to change the SourceMessage’s id into SourceMessage’s label_id because I need to integrate this table into my database as it has its own convention.
[b]
- Can we change the field type if each table?[/b]
For example : I want to change the Message’s language into Message’s language_id because I need to use another table to keep the language data.
3. If it possible, please guide me how.
Thanks in advance
It would be perfect if Yii can do it