schema-oci.sql 861 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * Database schema required by \yii\i18n\DbMessageSource.
  3. *
  4. * @author Dmitry Naumenko <d.naumenko.a@gmail.com>
  5. * @link http://www.yiiframework.com/
  6. * @copyright 2008 Yii Software LLC
  7. * @license http://www.yiiframework.com/license/
  8. * @since 2.0.7
  9. */
  10. drop table if exists "source_message";
  11. drop table if exists "message";
  12. CREATE TABLE "source_message"
  13. (
  14. "id" integer NOT NULL PRIMARY KEY,
  15. "category" varchar(255),
  16. "message" clob
  17. );
  18. CREATE SEQUENCE "source_message_SEQ";
  19. CREATE TABLE "message"
  20. (
  21. "id" integer NOT NULL,
  22. "language" varchar(16) NOT NULL,
  23. "translation" clob,
  24. primary key ("id", "language"),
  25. foreign key ("id") references "source_message" ("id") on delete cascade
  26. );
  27. CREATE INDEX idx_message_language ON "message"("language");
  28. CREATE INDEX idx_source_message_category ON "source_message"("category");