generated from yiisoft/package-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs and config files - 1. (#57)
- Loading branch information
1 parent
789d6d0
commit d5f3e87
Showing
11 changed files
with
336 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Database schema required by yiisoft/translator-message-db for MSSQL. | ||
*/ | ||
CREATE TABLE [dbo].[source_message] | ||
( | ||
[id] INT IDENTITY NOT NULL, | ||
[category] NVARCHAR(255), | ||
[message_id] NVARCHAR(max), | ||
[comment] NVARCHAR(max) | ||
); | ||
|
||
CREATE UNIQUE CLUSTERED INDEX [PK_source_message] ON [dbo].[source_message] ([id]); | ||
CREATE INDEX [IDX_source_message-category] ON [dbo].[source_message] ([category]); | ||
|
||
CREATE TABLE [dbo].[message] | ||
( | ||
[id] INT NOT NULL, | ||
[locale] NVARCHAR(16) NOT NULL, | ||
[translation] NVARCHAR(max) | ||
); | ||
|
||
CREATE UNIQUE CLUSTERED INDEX [PK_message-id-locale] ON [dbo].[message] ([id], [locale]); | ||
CREATE INDEX [IDX_message-locale] ON [dbo].[message] ([locale]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Database schema required by yiisoft/translator-message-db for MySQL. | ||
*/ | ||
CREATE TABLE `source_message` | ||
( | ||
[id] INT AUTO_INCREMENT PRIMARY KEY NOT NULL, | ||
[category] VARCHAR(255) NULL, | ||
[message_id] TEXT NULL, | ||
[comment] TEXT NULL | ||
); | ||
|
||
CREATE INDEX `IDX_source_message-id` ON `source_message` (`id`); | ||
|
||
CREATE TABLE `message` ( | ||
( | ||
`id` INT NOT NULL, | ||
`locale` VARCHAR(16) NOT NULL, | ||
`translation` TEXT NULL, | ||
PRIMARY KEY (`id`, `locale`), | ||
CONSTRAINT `FK_source_message_message` FOREIGN KEY (`id`) REFERENCES `source_message` (`id`) ON DELETE CASCADE | ||
); | ||
|
||
CREATE INDEX `IDX_message-locale` ON `message` (`locale`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Database schema required by yiisoft/translator-message-db for Oracle. | ||
*/ | ||
CREATE TABLE "source_message" | ||
( | ||
"id" NUMBER(10) NOT NULL PRIMARY KEY, | ||
"category" VARCHAR2(255), | ||
"message_id" CLOB, | ||
"comment" CLOB | ||
); | ||
|
||
CREATE INDEX "IDX_source_message-category" on "source_message" ("category"); | ||
|
||
CREATE TRIGGER "source_message_TRG" | ||
BEFORE INSERT | ||
ON "source_message" | ||
FOR EACH ROW | ||
BEGIN <<COLUMN_SEQUENCES>> BEGIN | ||
IF INSERTING AND :NEW."id" IS NULL THEN SELECT "source_message_SEQ".NEXTVAL INTO :NEW."id" FROM SYS.DUAL; END IF; | ||
END COLUMN_SEQUENCES; | ||
END; | ||
/ | ||
|
||
CREATE TABLE "message" | ||
( | ||
"id" NUMBER(10) NOT NULL CONSTRAINT "FK_source_message_message" REFERENCES "source_message" ON DELETE CASCADE, | ||
"locale" VARCHAR2(16) NOT NULL, | ||
"translation" CLOB, | ||
CONSTRAINT "PK_oci_message-id-locale" PRIMARY KEY ("id", "locale") | ||
); | ||
|
||
CREATE INDEX "IDX_message-locale" on "message" ("locale"); | ||
|
||
CREATE TRIGGER "message_TRG" | ||
BEFORE INSERT | ||
ON "message" | ||
FOR EACH ROW | ||
BEGIN <<COLUMN_SEQUENCES>> BEGIN | ||
IF INSERTING AND :NEW."id" IS NULL THEN SELECT "message_SEQ".NEXTVAL INTO :NEW."id" FROM SYS.DUAL; END IF; | ||
END COLUMN_SEQUENCES; | ||
END; | ||
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Database schema required by yiisoft/translator-message-db for PostgreSQL. | ||
*/ | ||
CREATE TABLE source_message | ||
( | ||
id SERIAL PRIMARY KEY, | ||
category VARCHAR(255), | ||
message_id TEXT, | ||
comment TEXT | ||
); | ||
|
||
CREATE INDEX "IDX_source_message-category" on "source_message" ("category"); | ||
|
||
CREATE TABLE message | ||
( | ||
id INTEGER NOT NULL CONSTRAINT "FK_source_message_message" REFERENCES "source_message" ON UPDATE RESTRICT ON DELETE CASCADE, | ||
locale VARCHAR(16) NOT NULL, | ||
translation TEXT, | ||
CONSTRAINT "PK_message-id-locale" PRIMARY KEY ("id", "locale") | ||
); | ||
|
||
CREATE INDEX "IDX_message-locale" on "message" ("locale"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Database schema required by yiisoft/translator-message-db for SQLite. | ||
*/ | ||
CREATE TABLE "source_message" | ||
( | ||
id INTEGER NOT NULL CONSTRAINT "PK_source_message" PRIMARY KEY, | ||
category VARCHAR(255), | ||
message_id TEXT, | ||
comment TEXT | ||
); | ||
|
||
CREATE INDEX "IDX_source_message-category" on "source_message" ("category"); | ||
|
||
CREATE TABLE "message" | ||
( | ||
id INTEGER NOT NULL CONSTRAINT "FK_source_message_message" REFERENCES "source_message" ON DELETE CASCADE, | ||
locale VARCHAR(16) NOT NULL, | ||
translation TEXT, | ||
PRIMARY KEY ("id", "locale") | ||
); | ||
|
||
CREATE INDEX "IDX_message-locale" on "message" ("locale"); |
Oops, something went wrong.