[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/installation/sql/postgresql/ -> extensions.sql (source)

   1  --
   2  -- Table structure for table `#__banners`
   3  --
   4  
   5  CREATE TABLE IF NOT EXISTS "#__banners" (
   6    "id" serial NOT NULL,
   7    "cid" bigint DEFAULT 0 NOT NULL,
   8    "type" bigint DEFAULT 0 NOT NULL,
   9    "name" varchar(255) DEFAULT '' NOT NULL,
  10    "alias" varchar(255) DEFAULT '' NOT NULL,
  11    "imptotal" bigint DEFAULT 0 NOT NULL,
  12    "impmade" bigint DEFAULT 0 NOT NULL,
  13    "clicks" bigint DEFAULT 0 NOT NULL,
  14    "clickurl" varchar(200) DEFAULT '' NOT NULL,
  15    "state" smallint DEFAULT 0 NOT NULL,
  16    "catid" bigint DEFAULT 0 NOT NULL,
  17    "description" text NOT NULL,
  18    "custombannercode" varchar(2048) NOT NULL,
  19    "sticky" smallint DEFAULT 0 NOT NULL,
  20    "ordering" bigint DEFAULT 0 NOT NULL,
  21    "metakey" text,
  22    "params" text NOT NULL,
  23    "own_prefix" smallint DEFAULT 0 NOT NULL,
  24    "metakey_prefix" varchar(255) DEFAULT '' NOT NULL,
  25    "purchase_type" smallint DEFAULT -1 NOT NULL,
  26    "track_clicks" smallint DEFAULT -1 NOT NULL,
  27    "track_impressions" smallint DEFAULT -1 NOT NULL,
  28    "checked_out" integer,
  29    "checked_out_time" timestamp without time zone,
  30    "publish_up" timestamp without time zone,
  31    "publish_down" timestamp without time zone,
  32    "reset" timestamp without time zone,
  33    "created" timestamp without time zone NOT NULL,
  34    "language" varchar(7) DEFAULT '' NOT NULL,
  35    "created_by" bigint DEFAULT 0 NOT NULL,
  36    "created_by_alias" varchar(255) DEFAULT '' NOT NULL,
  37    "modified" timestamp without time zone NOT NULL,
  38    "modified_by" bigint DEFAULT 0 NOT NULL,
  39    "version" bigint DEFAULT 1 NOT NULL,
  40    PRIMARY KEY ("id")
  41  );
  42  CREATE INDEX "#__banners_idx_state" ON "#__banners" ("state");
  43  CREATE INDEX "#__banners_idx_own_prefix" ON "#__banners" ("own_prefix");
  44  CREATE INDEX "#__banners_idx_metakey_prefix" ON "#__banners" ("metakey_prefix");
  45  CREATE INDEX "#__banners_idx_banner_catid" ON "#__banners" ("catid");
  46  CREATE INDEX "#__banners_idx_language" ON "#__banners" ("language");
  47  
  48  --
  49  -- Table structure for table `#__banner_clients`
  50  --
  51  
  52  CREATE TABLE IF NOT EXISTS "#__banner_clients" (
  53    "id" serial NOT NULL,
  54    "name" varchar(255) DEFAULT '' NOT NULL,
  55    "contact" varchar(255) DEFAULT '' NOT NULL,
  56    "email" varchar(255) DEFAULT '' NOT NULL,
  57    "extrainfo" text NOT NULL,
  58    "state" smallint DEFAULT 0 NOT NULL,
  59    "checked_out" integer,
  60    "checked_out_time" timestamp without time zone,
  61    "metakey" text,
  62    "own_prefix" smallint DEFAULT 0 NOT NULL,
  63    "metakey_prefix" varchar(255) DEFAULT '' NOT NULL,
  64    "purchase_type" smallint DEFAULT -1 NOT NULL,
  65    "track_clicks" smallint DEFAULT -1 NOT NULL,
  66    "track_impressions" smallint DEFAULT -1 NOT NULL,
  67    PRIMARY KEY ("id")
  68  );
  69  CREATE INDEX "#__banner_clients_idx_own_prefix" ON "#__banner_clients" ("own_prefix");
  70  CREATE INDEX "#__banner_clients_idx_metakey_prefix" ON "#__banner_clients" ("metakey_prefix");
  71  
  72  --
  73  -- Table structure for table `#__banner_tracks`
  74  --
  75  
  76  CREATE TABLE IF NOT EXISTS "#__banner_tracks" (
  77    "track_date" timestamp without time zone NOT NULL,
  78    "track_type" bigint NOT NULL,
  79    "banner_id" bigint NOT NULL,
  80    "count" bigint DEFAULT 0 NOT NULL,
  81    PRIMARY KEY ("track_date", "track_type", "banner_id")
  82  );
  83  CREATE INDEX "#__banner_tracks_idx_track_date" ON "#__banner_tracks" ("track_date");
  84  CREATE INDEX "#__banner_tracks_idx_track_type" ON "#__banner_tracks" ("track_type");
  85  CREATE INDEX "#__banner_tracks_idx_banner_id" ON "#__banner_tracks" ("banner_id");
  86  
  87  --
  88  -- Table structure for table `#__contact_details`
  89  --
  90  
  91  CREATE TABLE IF NOT EXISTS "#__contact_details" (
  92    "id" serial NOT NULL,
  93    "name" varchar(255) NOT NULL,
  94    "alias" varchar(255) NOT NULL,
  95    "con_position" varchar(255),
  96    "address" text,
  97    "suburb" varchar(100),
  98    "state" varchar(100),
  99    "country" varchar(100),
 100    "postcode" varchar(100),
 101    "telephone" varchar(255),
 102    "fax" varchar(255),
 103    "misc" text,
 104    "image" varchar(255),
 105    "email_to" varchar(255),
 106    "default_con" smallint NOT NULL DEFAULT 0,
 107    "published" smallint NOT NULL DEFAULT 0,
 108    "checked_out" integer,
 109    "checked_out_time" timestamp without time zone,
 110    "ordering" bigint NOT NULL DEFAULT 0,
 111    "params" text NOT NULL,
 112    "user_id" bigint NOT NULL DEFAULT 0,
 113    "catid" bigint NOT NULL DEFAULT 0,
 114    "access" bigint NOT NULL DEFAULT 0,
 115    "mobile" varchar(255) NOT NULL DEFAULT '',
 116    "webpage" varchar(255) NOT NULL DEFAULT '',
 117    "sortname1" varchar(255) NOT NULL DEFAULT '',
 118    "sortname2" varchar(255) NOT NULL DEFAULT '',
 119    "sortname3" varchar(255) NOT NULL DEFAULT '',
 120    "language" varchar(7) NOT NULL,
 121    "created" timestamp without time zone NOT NULL,
 122    "created_by" integer NOT NULL DEFAULT 0,
 123    "created_by_alias" varchar(255) NOT NULL DEFAULT '',
 124    "modified" timestamp without time zone NOT NULL,
 125    "modified_by" integer NOT NULL DEFAULT 0,
 126    "metakey" text,
 127    "metadesc" text NOT NULL,
 128    "metadata" text NOT NULL,
 129    "featured" smallint NOT NULL DEFAULT 0,
 130    "publish_up" timestamp without time zone,
 131    "publish_down" timestamp without time zone,
 132    "version" bigint NOT NULL DEFAULT 1,
 133    "hits" bigint NOT NULL DEFAULT 0,
 134    PRIMARY KEY ("id")
 135  );
 136  CREATE INDEX "#__contact_details_idx_access" ON "#__contact_details" ("access");
 137  CREATE INDEX "#__contact_details_idx_checkout" ON "#__contact_details" ("checked_out");
 138  CREATE INDEX "#__contact_details_idx_state" ON "#__contact_details" ("published");
 139  CREATE INDEX "#__contact_details_idx_catid" ON "#__contact_details" ("catid");
 140  CREATE INDEX "#__contact_details_idx_createdby" ON "#__contact_details" ("created_by");
 141  CREATE INDEX "#__contact_details_idx_featured_catid" ON "#__contact_details" ("featured", "catid");
 142  CREATE INDEX "#__contact_details_idx_language" ON "#__contact_details" ("language");
 143  
 144  COMMENT ON COLUMN "#__contact_details"."featured" IS 'Set if contact is featured.';
 145  
 146  --
 147  -- Table structure for table `#__content`
 148  --
 149  
 150  CREATE TABLE IF NOT EXISTS "#__content" (
 151    "id" serial NOT NULL,
 152    "asset_id" bigint DEFAULT 0 NOT NULL,
 153    "title" varchar(255) DEFAULT '' NOT NULL,
 154    "alias" varchar(255) DEFAULT '' NOT NULL,
 155    "introtext" text NOT NULL,
 156    "fulltext" text NOT NULL,
 157    "state" smallint DEFAULT 0 NOT NULL,
 158    "catid" bigint DEFAULT 0 NOT NULL,
 159    "created" timestamp without time zone NOT NULL,
 160    "created_by" bigint DEFAULT 0 NOT NULL,
 161    "created_by_alias" varchar(255) DEFAULT '' NOT NULL,
 162    "modified" timestamp without time zone NOT NULL,
 163    "modified_by" bigint DEFAULT 0 NOT NULL,
 164    "checked_out" integer,
 165    "checked_out_time" timestamp without time zone,
 166    "publish_up" timestamp without time zone,
 167    "publish_down" timestamp without time zone,
 168    "images" text NOT NULL,
 169    "urls" text NOT NULL,
 170    "attribs" varchar(5120) NOT NULL,
 171    "version" bigint DEFAULT 1 NOT NULL,
 172    "ordering" bigint DEFAULT 0 NOT NULL,
 173    "metakey" text,
 174    "metadesc" text NOT NULL,
 175    "access" bigint DEFAULT 0 NOT NULL,
 176    "hits" bigint DEFAULT 0 NOT NULL,
 177    "metadata" text NOT NULL,
 178    "featured" smallint DEFAULT 0 NOT NULL,
 179    "language" varchar(7) DEFAULT '' NOT NULL,
 180    "note" varchar(255) DEFAULT '' NOT NULL,
 181    PRIMARY KEY ("id")
 182  );
 183  CREATE INDEX "#__content_idx_access" ON "#__content" ("access");
 184  CREATE INDEX "#__content_idx_checkout" ON "#__content" ("checked_out");
 185  CREATE INDEX "#__content_idx_state" ON "#__content" ("state");
 186  CREATE INDEX "#__content_idx_catid" ON "#__content" ("catid");
 187  CREATE INDEX "#__content_idx_createdby" ON "#__content" ("created_by");
 188  CREATE INDEX "#__content_idx_featured_catid" ON "#__content" ("featured", "catid");
 189  CREATE INDEX "#__content_idx_language" ON "#__content" ("language");
 190  CREATE INDEX "#__content_idx_alias" ON "#__content" ("alias");
 191  
 192  COMMENT ON COLUMN "#__content"."asset_id" IS 'FK to the #__assets table.';
 193  COMMENT ON COLUMN "#__content"."featured" IS 'Set if article is featured.';
 194  COMMENT ON COLUMN "#__content"."language" IS 'The language code for the article.';
 195  
 196  
 197  --
 198  -- Table structure for table `#__content_frontpage`
 199  --
 200  
 201  CREATE TABLE IF NOT EXISTS "#__content_frontpage" (
 202    "content_id" bigint DEFAULT 0 NOT NULL,
 203    "ordering" bigint DEFAULT 0 NOT NULL,
 204    "featured_up" timestamp without time zone,
 205    "featured_down" timestamp without time zone,
 206    PRIMARY KEY ("content_id")
 207  );
 208  
 209  --
 210  -- Table structure for table `#__content_rating`
 211  --
 212  
 213  CREATE TABLE IF NOT EXISTS "#__content_rating" (
 214    "content_id" bigint DEFAULT 0 NOT NULL,
 215    "rating_sum" bigint DEFAULT 0 NOT NULL,
 216    "rating_count" bigint DEFAULT 0 NOT NULL,
 217    "lastip" varchar(50) DEFAULT '' NOT NULL,
 218    PRIMARY KEY ("content_id")
 219  );
 220  
 221  --
 222  -- Table structure for table `#__finder_filters`
 223  --
 224  
 225  CREATE TABLE IF NOT EXISTS "#__finder_filters" (
 226    "filter_id" serial NOT NULL,
 227    "title" varchar(255) NOT NULL,
 228    "alias" varchar(255) NOT NULL,
 229    "state" smallint DEFAULT 1 NOT NULL,
 230    "created" timestamp without time zone NOT NULL,
 231    "created_by" integer DEFAULT 0 NOT NULL,
 232    "created_by_alias" varchar(255) DEFAULT '' NOT NULL,
 233    "modified" timestamp without time zone NOT NULL,
 234    "modified_by" integer DEFAULT 0 NOT NULL,
 235    "checked_out" integer,
 236    "checked_out_time" timestamp without time zone,
 237    "map_count" integer DEFAULT 0 NOT NULL,
 238    "data" text,
 239    "params" text,
 240    PRIMARY KEY ("filter_id")
 241  );
 242  
 243  --
 244  -- Table structure for table `#__finder_links`
 245  --
 246  
 247  CREATE TABLE IF NOT EXISTS "#__finder_links" (
 248    "link_id" serial NOT NULL,
 249    "url" varchar(255) NOT NULL,
 250    "route" varchar(400) NOT NULL,
 251    "title" varchar(400) DEFAULT NULL,
 252    "description" text,
 253    "indexdate" timestamp without time zone NOT NULL,
 254    "md5sum" varchar(32) DEFAULT NULL,
 255    "published" smallint DEFAULT 1 NOT NULL,
 256    "state" integer DEFAULT 1 NOT NULL,
 257    "access" integer DEFAULT 0 NOT NULL,
 258    "language" varchar(7) DEFAULT '' NOT NULL,
 259    "publish_start_date" timestamp without time zone,
 260    "publish_end_date" timestamp without time zone,
 261    "start_date" timestamp without time zone,
 262    "end_date" timestamp without time zone,
 263    "list_price" numeric(8,2) DEFAULT 0 NOT NULL,
 264    "sale_price" numeric(8,2) DEFAULT 0 NOT NULL,
 265    "type_id" bigint NOT NULL,
 266    "object" bytea,
 267    PRIMARY KEY ("link_id")
 268  );
 269  CREATE INDEX "#__finder_links_idx_type" on "#__finder_links" ("type_id");
 270  CREATE INDEX "#__finder_links_idx_title" on "#__finder_links" ("title");
 271  CREATE INDEX "#__finder_links_idx_md5" on "#__finder_links" ("md5sum");
 272  CREATE INDEX "#__finder_links_idx_language" on "#__finder_links" ("language");
 273  CREATE INDEX "#__finder_links_idx_url" on "#__finder_links" (substr(url,0,76));
 274  CREATE INDEX "#__finder_links_idx_published_list" on "#__finder_links" ("published", "state", "access", "publish_start_date", "publish_end_date", "list_price");
 275  CREATE INDEX "#__finder_links_idx_published_sale" on "#__finder_links" ("published", "state", "access", "publish_start_date", "publish_end_date", "sale_price");
 276  
 277  --
 278  -- Table structure for table `#__finder_links_terms`
 279  --
 280  
 281  CREATE TABLE IF NOT EXISTS "#__finder_links_terms" (
 282    "link_id" integer NOT NULL,
 283    "term_id" integer NOT NULL,
 284    "weight" numeric(8,2) DEFAULT 0 NOT NULL,
 285    PRIMARY KEY ("link_id", "term_id")
 286  );
 287  CREATE INDEX "#__finder_links_terms_idx_term_weight" on "#__finder_links_terms" ("term_id", "weight");
 288  CREATE INDEX "#__finder_links_terms_idx_link_term_weight" on "#__finder_links_terms" ("link_id", "term_id", "weight");
 289  
 290  --
 291  -- Table structure for table `#__finder_logging`
 292  --
 293  
 294  CREATE TABLE IF NOT EXISTS "#__finder_logging" (
 295    "searchterm" character varying(255) NOT NULL DEFAULT '',
 296    "md5sum" character varying(32) NOT NULL DEFAULT '',
 297    "query" bytea NOT NULL,
 298    "hits" integer NOT NULL DEFAULT 1,
 299    "results" integer NOT NULL DEFAULT 0,
 300    PRIMARY KEY ("md5sum")
 301  );
 302  CREATE INDEX "#__finder_logging_idx_md5sum" on "#__finder_logging" ("md5sum");
 303  CREATE INDEX "#__finder_logging_idx_searchterm" on "#__finder_logging" ("searchterm");
 304  
 305  --
 306  -- Table structure for table `#__finder_taxonomy`
 307  --
 308  
 309  CREATE TABLE IF NOT EXISTS "#__finder_taxonomy" (
 310    "id" serial NOT NULL,
 311    "parent_id" integer DEFAULT 0 NOT NULL,
 312    "lft" integer DEFAULT 0 NOT NULL,
 313    "rgt" integer DEFAULT 0 NOT NULL,
 314    "level" integer DEFAULT 0 NOT NULL,
 315    "path" VARCHAR(400) NOT NULL DEFAULT '',
 316    "title" VARCHAR(255) NOT NULL DEFAULT '',
 317    "alias" VARCHAR(400) NOT NULL DEFAULT '',
 318    "state" smallint DEFAULT 1 NOT NULL,
 319    "access" smallint DEFAULT 1 NOT NULL,
 320    "language" varchar(7) DEFAULT '' NOT NULL,
 321    PRIMARY KEY ("id")
 322  );
 323  CREATE INDEX "#__finder_taxonomy_state" on "#__finder_taxonomy" ("state");
 324  CREATE INDEX "#__finder_taxonomy_access" on "#__finder_taxonomy" ("access");
 325  CREATE INDEX "#__finder_taxonomy_path" on "#__finder_taxonomy" ("path");
 326  CREATE INDEX "#__finder_taxonomy_level" on "#__finder_taxonomy" ("level");
 327  CREATE INDEX "#__finder_taxonomy_lft_rgt" on "#__finder_taxonomy" ("lft", "rgt");
 328  CREATE INDEX "#__finder_taxonomy_alias" on "#__finder_taxonomy" ("alias");
 329  CREATE INDEX "#__finder_taxonomy_language" on "#__finder_taxonomy" ("language");
 330  CREATE INDEX "#__finder_taxonomy_idx_parent_published" on "#__finder_taxonomy" ("parent_id", "state", "access");
 331  
 332  --
 333  -- Dumping data for table `#__finder_taxonomy`
 334  --
 335  
 336  INSERT INTO "#__finder_taxonomy" ("id", "parent_id", "lft", "rgt", "level", "path", "title", "alias", "state", "access", "language") VALUES
 337  (1, 0, 0, 1, 0, '', 'ROOT', 'root', 1, 1, '*');
 338  
 339  SELECT setval('#__finder_taxonomy_id_seq', 2, false);
 340  
 341  --
 342  -- Table structure for table `#__finder_taxonomy_map`
 343  --
 344  
 345  CREATE TABLE IF NOT EXISTS "#__finder_taxonomy_map" (
 346    "link_id" integer NOT NULL,
 347    "node_id" integer NOT NULL,
 348    PRIMARY KEY ("link_id", "node_id")
 349  );
 350  CREATE INDEX "#__finder_taxonomy_map_link_id" on "#__finder_taxonomy_map" ("link_id");
 351  CREATE INDEX "#__finder_taxonomy_map_node_id" on "#__finder_taxonomy_map" ("node_id");
 352  
 353  --
 354  -- Table structure for table `#__finder_terms`
 355  --
 356  
 357  CREATE TABLE IF NOT EXISTS "#__finder_terms" (
 358    "term_id" serial NOT NULL,
 359    "term" varchar(75) NOT NULL,
 360    "stem" varchar(75) DEFAULT '' NOT NULL,
 361    "common" smallint DEFAULT 0 NOT NULL,
 362    "phrase" smallint DEFAULT 0 NOT NULL,
 363    "weight" numeric(8,2) DEFAULT 0 NOT NULL,
 364    "soundex" varchar(75) DEFAULT '' NOT NULL,
 365    "links" integer DEFAULT 0 NOT NULL,
 366    "language" varchar(7) DEFAULT '' NOT NULL,
 367    PRIMARY KEY ("term_id"),
 368    CONSTRAINT "#__finder_terms_idx_term_language" UNIQUE ("term", "language")
 369  );
 370  CREATE INDEX "#__finder_terms_idx_term_phrase" on "#__finder_terms" ("term", "phrase");
 371  CREATE INDEX "#__finder_terms_idx_stem_phrase" on "#__finder_terms" ("stem", "phrase");
 372  CREATE INDEX "#__finder_terms_idx_soundex_phrase" on "#__finder_terms" ("soundex", "phrase");
 373  CREATE INDEX "#__finder_terms_idx_language" on "#__finder_terms" ("language");
 374  
 375  --
 376  -- Table structure for table `#__finder_terms_common`
 377  --
 378  
 379  CREATE TABLE IF NOT EXISTS "#__finder_terms_common" (
 380    "term" varchar(75) NOT NULL,
 381    "language" varchar(7) DEFAULT '' NOT NULL,
 382    "custom" integer DEFAULT 0 NOT NULL,
 383    CONSTRAINT "#__finder_terms_common_idx_term_language" UNIQUE ("term", "language")
 384  );
 385  CREATE INDEX "#__finder_terms_common_idx_lang" on "#__finder_terms_common" ("language");
 386  
 387  --
 388  -- Dumping data for table `#__finder_terms_common`
 389  --
 390  
 391  INSERT INTO "#__finder_terms_common" ("term", "language", "custom") VALUES
 392  ('i', 'en', 0),
 393  ('me', 'en', 0),
 394  ('my', 'en', 0),
 395  ('myself', 'en', 0),
 396  ('we', 'en', 0),
 397  ('our', 'en', 0),
 398  ('ours', 'en', 0),
 399  ('ourselves', 'en', 0),
 400  ('you', 'en', 0),
 401  ('your', 'en', 0),
 402  ('yours', 'en', 0),
 403  ('yourself', 'en', 0),
 404  ('yourselves', 'en', 0),
 405  ('he', 'en', 0),
 406  ('him', 'en', 0),
 407  ('his', 'en', 0),
 408  ('himself', 'en', 0),
 409  ('she', 'en', 0),
 410  ('her', 'en', 0),
 411  ('hers', 'en', 0),
 412  ('herself', 'en', 0),
 413  ('it', 'en', 0),
 414  ('its', 'en', 0),
 415  ('itself', 'en', 0),
 416  ('they', 'en', 0),
 417  ('them', 'en', 0),
 418  ('their', 'en', 0),
 419  ('theirs', 'en', 0),
 420  ('themselves', 'en', 0),
 421  ('what', 'en', 0),
 422  ('which', 'en', 0),
 423  ('who', 'en', 0),
 424  ('whom', 'en', 0),
 425  ('this', 'en', 0),
 426  ('that', 'en', 0),
 427  ('these', 'en', 0),
 428  ('those', 'en', 0),
 429  ('am', 'en', 0),
 430  ('is', 'en', 0),
 431  ('are', 'en', 0),
 432  ('was', 'en', 0),
 433  ('were', 'en', 0),
 434  ('be', 'en', 0),
 435  ('been', 'en', 0),
 436  ('being', 'en', 0),
 437  ('have', 'en', 0),
 438  ('has', 'en', 0),
 439  ('had', 'en', 0),
 440  ('having', 'en', 0),
 441  ('do', 'en', 0),
 442  ('does', 'en', 0),
 443  ('did', 'en', 0),
 444  ('doing', 'en', 0),
 445  ('would', 'en', 0),
 446  ('should', 'en', 0),
 447  ('could', 'en', 0),
 448  ('ought', 'en', 0),
 449  ('i''m', 'en', 0),
 450  ('you''re', 'en', 0),
 451  ('he''s', 'en', 0),
 452  ('she''s', 'en', 0),
 453  ('it''s', 'en', 0),
 454  ('we''re', 'en', 0),
 455  ('they''re', 'en', 0),
 456  ('i''ve', 'en', 0),
 457  ('you''ve', 'en', 0),
 458  ('we''ve', 'en', 0),
 459  ('they''ve', 'en', 0),
 460  ('i''d', 'en', 0),
 461  ('you''d', 'en', 0),
 462  ('he''d', 'en', 0),
 463  ('she''d', 'en', 0),
 464  ('we''d', 'en', 0),
 465  ('they''d', 'en', 0),
 466  ('i''ll', 'en', 0),
 467  ('you''ll', 'en', 0),
 468  ('he''ll', 'en', 0),
 469  ('she''ll', 'en', 0),
 470  ('we''ll', 'en', 0),
 471  ('they''ll', 'en', 0),
 472  ('isn''t', 'en', 0),
 473  ('aren''t', 'en', 0),
 474  ('wasn''t', 'en', 0),
 475  ('weren''t', 'en', 0),
 476  ('hasn''t', 'en', 0),
 477  ('haven''t', 'en', 0),
 478  ('hadn''t', 'en', 0),
 479  ('doesn''t', 'en', 0),
 480  ('don''t', 'en', 0),
 481  ('didn''t', 'en', 0),
 482  ('won''t', 'en', 0),
 483  ('wouldn''t', 'en', 0),
 484  ('shan''t', 'en', 0),
 485  ('shouldn''t', 'en', 0),
 486  ('can''t', 'en', 0),
 487  ('cannot', 'en', 0),
 488  ('couldn''t', 'en', 0),
 489  ('mustn''t', 'en', 0),
 490  ('let''s', 'en', 0),
 491  ('that''s', 'en', 0),
 492  ('who''s', 'en', 0),
 493  ('what''s', 'en', 0),
 494  ('here''s', 'en', 0),
 495  ('there''s', 'en', 0),
 496  ('when''s', 'en', 0),
 497  ('where''s', 'en', 0),
 498  ('why''s', 'en', 0),
 499  ('how''s', 'en', 0),
 500  ('a', 'en', 0),
 501  ('an', 'en', 0),
 502  ('the', 'en', 0),
 503  ('and', 'en', 0),
 504  ('but', 'en', 0),
 505  ('if', 'en', 0),
 506  ('or', 'en', 0),
 507  ('because', 'en', 0),
 508  ('as', 'en', 0),
 509  ('until', 'en', 0),
 510  ('while', 'en', 0),
 511  ('of', 'en', 0),
 512  ('at', 'en', 0),
 513  ('by', 'en', 0),
 514  ('for', 'en', 0),
 515  ('with', 'en', 0),
 516  ('about', 'en', 0),
 517  ('against', 'en', 0),
 518  ('between', 'en', 0),
 519  ('into', 'en', 0),
 520  ('through', 'en', 0),
 521  ('during', 'en', 0),
 522  ('before', 'en', 0),
 523  ('after', 'en', 0),
 524  ('above', 'en', 0),
 525  ('below', 'en', 0),
 526  ('to', 'en', 0),
 527  ('from', 'en', 0),
 528  ('up', 'en', 0),
 529  ('down', 'en', 0),
 530  ('in', 'en', 0),
 531  ('out', 'en', 0),
 532  ('on', 'en', 0),
 533  ('off', 'en', 0),
 534  ('over', 'en', 0),
 535  ('under', 'en', 0),
 536  ('again', 'en', 0),
 537  ('further', 'en', 0),
 538  ('then', 'en', 0),
 539  ('once', 'en', 0),
 540  ('here', 'en', 0),
 541  ('there', 'en', 0),
 542  ('when', 'en', 0),
 543  ('where', 'en', 0),
 544  ('why', 'en', 0),
 545  ('how', 'en', 0),
 546  ('all', 'en', 0),
 547  ('any', 'en', 0),
 548  ('both', 'en', 0),
 549  ('each', 'en', 0),
 550  ('few', 'en', 0),
 551  ('more', 'en', 0),
 552  ('most', 'en', 0),
 553  ('other', 'en', 0),
 554  ('some', 'en', 0),
 555  ('such', 'en', 0),
 556  ('no', 'en', 0),
 557  ('nor', 'en', 0),
 558  ('not', 'en', 0),
 559  ('only', 'en', 0),
 560  ('own', 'en', 0),
 561  ('same', 'en', 0),
 562  ('so', 'en', 0),
 563  ('than', 'en', 0),
 564  ('too', 'en', 0),
 565  ('very', 'en', 0);
 566  
 567  --
 568  -- Table structure for table `#__finder_tokens`
 569  --
 570  
 571  CREATE TABLE IF NOT EXISTS "#__finder_tokens" (
 572    "term" varchar(75) NOT NULL,
 573    "stem" varchar(75) DEFAULT '' NOT NULL,
 574    "common" smallint DEFAULT 0 NOT NULL,
 575    "phrase" smallint DEFAULT 0 NOT NULL,
 576    "weight" numeric(8,2) DEFAULT 1 NOT NULL,
 577    "context" smallint DEFAULT 2 NOT NULL,
 578    "language" varchar(7) DEFAULT '' NOT NULL
 579  );
 580  CREATE INDEX "#__finder_tokens_idx_word" on "#__finder_tokens" ("term");
 581  CREATE INDEX "#__finder_tokens_idx_stem" on "#__finder_tokens" ("stem");
 582  CREATE INDEX "#__finder_tokens_idx_context" on "#__finder_tokens" ("context");
 583  CREATE INDEX "#__finder_tokens_idx_language" on "#__finder_tokens" ("language");
 584  
 585  --
 586  -- Table structure for table `#__finder_tokens_aggregate`
 587  --
 588  
 589  CREATE TABLE IF NOT EXISTS "#__finder_tokens_aggregate" (
 590    "term_id" integer NOT NULL,
 591    "term" varchar(75) NOT NULL,
 592    "stem" varchar(75) DEFAULT '' NOT NULL,
 593    "common" smallint DEFAULT 0 NOT NULL,
 594    "phrase" smallint DEFAULT 0 NOT NULL,
 595    "term_weight" numeric(8,2) NOT NULL DEFAULT 0,
 596    "context" smallint DEFAULT 2 NOT NULL,
 597    "context_weight" numeric(8,2) NOT NULL DEFAULT 0,
 598    "total_weight" numeric(8,2) NOT NULL DEFAULT 0,
 599    "language" varchar(7) DEFAULT '' NOT NULL
 600  );
 601  CREATE INDEX "#__finder_tokens_aggregate_token" on "#__finder_tokens_aggregate" ("term");
 602  CREATE INDEX "_#__finder_tokens_aggregate_keyword_id" on "#__finder_tokens_aggregate" ("term_id");
 603  
 604  --
 605  -- Table structure for table `#__finder_types`
 606  --
 607  
 608  CREATE TABLE IF NOT EXISTS "#__finder_types" (
 609    "id" serial NOT NULL,
 610    "title" varchar(100) NOT NULL,
 611    "mime" varchar(100) DEFAULT '' NOT NULL,
 612    PRIMARY KEY ("id"),
 613    CONSTRAINT "#__finder_types_title" UNIQUE ("title")
 614  );
 615  
 616  --
 617  -- Table structure for table `#__messages`
 618  --
 619  
 620  CREATE TABLE IF NOT EXISTS "#__messages" (
 621    "message_id" serial NOT NULL,
 622    "user_id_from" bigint DEFAULT 0 NOT NULL,
 623    "user_id_to" bigint DEFAULT 0 NOT NULL,
 624    "folder_id" smallint DEFAULT 0 NOT NULL,
 625    "date_time" timestamp without time zone NOT NULL,
 626    "state" smallint DEFAULT 0 NOT NULL,
 627    "priority" smallint DEFAULT 0 NOT NULL,
 628    "subject" varchar(255) DEFAULT '' NOT NULL,
 629    "message" text NOT NULL,
 630    PRIMARY KEY ("message_id")
 631  );
 632  CREATE INDEX "#__messages_useridto_state" ON "#__messages" ("user_id_to", "state");
 633  
 634  --
 635  -- Table structure for table `#__messages_cfg`
 636  --
 637  
 638  CREATE TABLE IF NOT EXISTS "#__messages_cfg" (
 639    "user_id" bigint DEFAULT 0 NOT NULL,
 640    "cfg_name" varchar(100) DEFAULT '' NOT NULL,
 641    "cfg_value" varchar(255) DEFAULT '' NOT NULL,
 642    CONSTRAINT "#__messages_cfg_idx_user_var_name" UNIQUE ("user_id", "cfg_name")
 643  );
 644  
 645  --
 646  -- Table structure for table `#__newsfeeds`
 647  --
 648  
 649  CREATE TABLE IF NOT EXISTS "#__newsfeeds" (
 650    "catid" bigint DEFAULT 0 NOT NULL,
 651    "id" serial NOT NULL,
 652    "name" varchar(100) DEFAULT '' NOT NULL,
 653    "alias" varchar(100) DEFAULT '' NOT NULL,
 654    "link" varchar(2048) DEFAULT '' NOT NULL,
 655    "published" smallint DEFAULT 0 NOT NULL,
 656    "numarticles" bigint DEFAULT 1 NOT NULL,
 657    "cache_time" bigint DEFAULT 3600 NOT NULL,
 658    "checked_out" integer,
 659    "checked_out_time" timestamp without time zone,
 660    "ordering" bigint DEFAULT 0 NOT NULL,
 661    "rtl" smallint DEFAULT 0 NOT NULL,
 662    "access" bigint DEFAULT 0 NOT NULL,
 663    "language" varchar(7) DEFAULT '' NOT NULL,
 664    "params" text NOT NULL,
 665    "created" timestamp without time zone NOT NULL,
 666    "created_by" integer DEFAULT 0 NOT NULL,
 667    "created_by_alias" varchar(255) DEFAULT '' NOT NULL,
 668    "modified" timestamp without time zone NOT NULL,
 669    "modified_by" integer DEFAULT 0 NOT NULL,
 670    "metakey" text,
 671    "metadesc" text NOT NULL,
 672    "metadata" text NOT NULL,
 673    "publish_up" timestamp without time zone,
 674    "publish_down" timestamp without time zone,
 675    "description" text NOT NULL,
 676    "version" bigint DEFAULT 1 NOT NULL,
 677    "hits" bigint DEFAULT 0 NOT NULL,
 678    "images" text NOT NULL,
 679    PRIMARY KEY ("id")
 680  );
 681  CREATE INDEX "#__newsfeeds_idx_access" ON "#__newsfeeds" ("access");
 682  CREATE INDEX "#__newsfeeds_idx_checkout" ON "#__newsfeeds" ("checked_out");
 683  CREATE INDEX "#__newsfeeds_idx_state" ON "#__newsfeeds" ("published");
 684  CREATE INDEX "#__newsfeeds_idx_catid" ON "#__newsfeeds" ("catid");
 685  CREATE INDEX "#__newsfeeds_idx_createdby" ON "#__newsfeeds" ("created_by");
 686  CREATE INDEX "#__newsfeeds_idx_language" ON "#__newsfeeds" ("language");
 687  
 688  --
 689  -- Table structure for table `#__privacy_requests`
 690  --
 691  
 692  CREATE TABLE "#__privacy_requests" (
 693    "id" serial NOT NULL,
 694    "email" varchar(100) DEFAULT '' NOT NULL,
 695    "requested_at" timestamp without time zone NOT NULL,
 696    "status" smallint DEFAULT 0 NOT NULL,
 697    "request_type" varchar(25) DEFAULT '' NOT NULL,
 698    "confirm_token" varchar(100) DEFAULT '' NOT NULL,
 699    "confirm_token_created_at" timestamp without time zone,
 700    PRIMARY KEY ("id")
 701  );
 702  
 703  --
 704  -- Table structure for table `#__privacy_consents`
 705  --
 706  
 707  CREATE TABLE "#__privacy_consents" (
 708    "id" serial NOT NULL,
 709    "user_id" bigint DEFAULT 0 NOT NULL,
 710    "state" smallint DEFAULT 1 NOT NULL,
 711    "created" timestamp without time zone NOT NULL,
 712    "subject" varchar(255) DEFAULT '' NOT NULL,
 713    "body" text NOT NULL,
 714    "remind" smallint DEFAULT 0 NOT NULL,
 715    "token" varchar(100) DEFAULT '' NOT NULL,
 716    PRIMARY KEY ("id")
 717  );
 718  CREATE INDEX "#__privacy_consents_idx_user_id" ON "#__privacy_consents" ("user_id");
 719  
 720  --
 721  -- Table structure for table `#__redirect_links`
 722  --
 723  
 724  CREATE TABLE IF NOT EXISTS "#__redirect_links" (
 725    "id" serial NOT NULL,
 726    "old_url" varchar(2048) NOT NULL,
 727    "new_url" varchar(2048),
 728    "referer" varchar(2048) NOT NULL,
 729    "comment" varchar(255) DEFAULT '' NOT NULL,
 730    "hits" bigint DEFAULT 0 NOT NULL,
 731    "published" smallint NOT NULL,
 732    "created_date" timestamp without time zone NOT NULL,
 733    "modified_date" timestamp without time zone NOT NULL,
 734    "header" integer DEFAULT 301 NOT NULL,
 735    PRIMARY KEY ("id")
 736  );
 737  CREATE INDEX "#__redirect_links_idx_old_url" ON "#__redirect_links" ("old_url");
 738  CREATE INDEX "#__redirect_links_idx_link_modified" ON "#__redirect_links" ("modified_date");
 739  
 740  --
 741  -- Table: #__action_logs
 742  --
 743  CREATE TABLE "#__action_logs" (
 744    "id" serial NOT NULL,
 745    "message_language_key" varchar(255) NOT NULL DEFAULT '',
 746    "message" text NOT NULL,
 747    "log_date" timestamp without time zone NOT NULL,
 748    "extension" varchar(50) NOT NULL DEFAULT '',
 749    "user_id" integer DEFAULT 0 NOT NULL,
 750    "item_id" integer DEFAULT 0 NOT NULL,
 751    "ip_address" varchar(40) NOT NULL DEFAULT '0.0.0.0',
 752    PRIMARY KEY ("id")
 753  );
 754  
 755  CREATE INDEX "#__action_logs_idx_user_id" ON "#__action_logs" ("user_id");
 756  CREATE INDEX "#__action_logs_idx_user_id_logdate" ON "#__action_logs" ("user_id", "log_date");
 757  CREATE INDEX "#__action_logs_idx_user_id_extension" ON "#__action_logs" ("user_id", "extension");
 758  CREATE INDEX "#__action_logs_idx_extension_itemid" ON "#__action_logs" ("extension", "item_id");
 759  
 760  --
 761  -- Table: #__action_logs_extensions
 762  --
 763  CREATE TABLE "#__action_logs_extensions" (
 764    "id" serial NOT NULL,
 765    "extension" varchar(50) NOT NULL DEFAULT '',
 766    PRIMARY KEY ("id")
 767  );
 768  
 769  --
 770  -- Dumping data for table `#__action_logs_extensions`
 771  --
 772  INSERT INTO "#__action_logs_extensions" ("id", "extension") VALUES
 773  (1, 'com_banners'),
 774  (2, 'com_cache'),
 775  (3, 'com_categories'),
 776  (4, 'com_config'),
 777  (5, 'com_contact'),
 778  (6, 'com_content'),
 779  (7, 'com_installer'),
 780  (8, 'com_media'),
 781  (9, 'com_menus'),
 782  (10, 'com_messages'),
 783  (11, 'com_modules'),
 784  (12, 'com_newsfeeds'),
 785  (13, 'com_plugins'),
 786  (14, 'com_redirect'),
 787  (15, 'com_tags'),
 788  (16, 'com_templates'),
 789  (17, 'com_users'),
 790  (18, 'com_checkin'),
 791  (19, 'com_scheduler');
 792  
 793  SELECT setval('#__action_logs_extensions_id_seq', 20, false);
 794  -- --------------------------------------------------------
 795  
 796  --
 797  -- Table: #__action_log_config
 798  --
 799  CREATE TABLE "#__action_log_config" (
 800    "id" serial NOT NULL,
 801    "type_title" varchar(255) NOT NULL DEFAULT '',
 802    "type_alias" varchar(255) NOT NULL DEFAULT '',
 803    "id_holder" varchar(255) NULL,
 804    "title_holder" varchar(255) NULL,
 805    "table_name" varchar(255) NULL,
 806    "text_prefix" varchar(255) NULL,
 807    PRIMARY KEY ("id")
 808  );
 809  
 810  --
 811  -- Dumping data for table `#__action_log_config`
 812  --
 813  INSERT INTO "#__action_log_config" ("id", "type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES
 814  (1, 'article', 'com_content.article', 'id' ,'title' , '#__content', 'PLG_ACTIONLOG_JOOMLA'),
 815  (2, 'article', 'com_content.form', 'id', 'title' , '#__content', 'PLG_ACTIONLOG_JOOMLA'),
 816  (3, 'banner', 'com_banners.banner', 'id' ,'name' , '#__banners', 'PLG_ACTIONLOG_JOOMLA'),
 817  (4, 'user_note', 'com_users.note', 'id', 'subject' ,'#__user_notes', 'PLG_ACTIONLOG_JOOMLA'),
 818  (5, 'media', 'com_media.file', '' , 'name' , '',  'PLG_ACTIONLOG_JOOMLA'),
 819  (6, 'category', 'com_categories.category', 'id' , 'title' , '#__categories', 'PLG_ACTIONLOG_JOOMLA'),
 820  (7, 'menu', 'com_menus.menu', 'id' ,'title' , '#__menu_types', 'PLG_ACTIONLOG_JOOMLA'),
 821  (8, 'menu_item', 'com_menus.item', 'id' , 'title' , '#__menu', 'PLG_ACTIONLOG_JOOMLA'),
 822  (9, 'newsfeed', 'com_newsfeeds.newsfeed', 'id' ,'name' , '#__newsfeeds', 'PLG_ACTIONLOG_JOOMLA'),
 823  (10, 'link', 'com_redirect.link', 'id', 'old_url' , '#__redirect_links', 'PLG_ACTIONLOG_JOOMLA'),
 824  (11, 'tag', 'com_tags.tag', 'id', 'title' , '#__tags', 'PLG_ACTIONLOG_JOOMLA'),
 825  (12, 'style', 'com_templates.style', 'id' , 'title' , '#__template_styles', 'PLG_ACTIONLOG_JOOMLA'),
 826  (13, 'plugin', 'com_plugins.plugin', 'extension_id' , 'name' , '#__extensions', 'PLG_ACTIONLOG_JOOMLA'),
 827  (14, 'component_config', 'com_config.component', 'extension_id' , 'name', '', 'PLG_ACTIONLOG_JOOMLA'),
 828  (15, 'contact', 'com_contact.contact', 'id', 'name', '#__contact_details', 'PLG_ACTIONLOG_JOOMLA'),
 829  (16, 'module', 'com_modules.module', 'id' ,'title', '#__modules', 'PLG_ACTIONLOG_JOOMLA'),
 830  (17, 'access_level', 'com_users.level', 'id' , 'title', '#__viewlevels', 'PLG_ACTIONLOG_JOOMLA'),
 831  (18, 'banner_client', 'com_banners.client', 'id', 'name', '#__banner_clients', 'PLG_ACTIONLOG_JOOMLA'),
 832  (19, 'application_config', 'com_config.application', '', 'name', '', 'PLG_ACTIONLOG_JOOMLA'),
 833  (20, 'task', 'com_scheduler.task', 'id', 'title', '#__scheduler_tasks', 'PLG_ACTIONLOG_JOOMLA');
 834  
 835  
 836  SELECT setval('#__action_log_config_id_seq', 21, false);
 837  
 838  --
 839  -- Table structure for table `#__action_logs_users`
 840  --
 841  
 842  CREATE TABLE "#__action_logs_users" (
 843    "user_id" integer NOT NULL,
 844    "notify" integer NOT NULL,
 845    "extensions" text NOT NULL,
 846    PRIMARY KEY ("user_id")
 847  );
 848  
 849  CREATE INDEX "#__action_logs_users_idx_notify" ON "#__action_logs_users" ("notify");
 850  
 851  -- --------------------------------------------------------
 852  
 853  --
 854  -- Table structure for table "#__scheduler_tasks"
 855  --
 856  
 857  CREATE TABLE IF NOT EXISTS "#__scheduler_tasks"
 858  (
 859    "id" serial NOT NULL,
 860    "asset_id" bigint DEFAULT 0 NOT NULL,
 861    "title" varchar(255) NOT NULL,
 862    "type" varchar(128) NOT NULL,
 863    "execution_rules" text,
 864    "cron_rules" text,
 865    "state" smallint DEFAULT 0 NOT NULL,
 866    "last_exit_code" integer DEFAULT 0 NOT NULL,
 867    "last_execution" timestamp without time zone,
 868    "next_execution" timestamp without time zone,
 869    "times_executed" integer DEFAULT 0 NOT NULL,
 870    "times_failed" integer DEFAULT 0,
 871    "locked" timestamp without time zone,
 872    "priority" smallint DEFAULT 0 NOT NULL,
 873    "ordering" bigint DEFAULT 0 NOT NULL,
 874    "cli_exclusive" smallint DEFAULT 0 NOT NULL,
 875    "params" text NOT NULL,
 876    "note" text,
 877    "created" timestamp without time zone NOT NULL,
 878    "created_by" bigint DEFAULT 0 NOT NULL,
 879    "checked_out" integer,
 880    "checked_out_time" timestamp without time zone,
 881    PRIMARY KEY ("id")
 882  );
 883  
 884  CREATE INDEX "#__scheduler_tasks_idx_type" ON "#__scheduler_tasks" ("type");
 885  CREATE INDEX "#__scheduler_tasks_idx_state" ON "#__scheduler_tasks" ("state");
 886  CREATE INDEX "#__scheduler_tasks_idx_last_exit" ON "#__scheduler_tasks" ("last_exit_code");
 887  CREATE INDEX "#__scheduler_tasks_idx_next_exec" ON "#__scheduler_tasks" ("next_execution");
 888  CREATE INDEX "#__scheduler_tasks_idx_locked" ON "#__scheduler_tasks" ("locked");
 889  CREATE INDEX "#__scheduler_tasks_idx_priority" ON "#__scheduler_tasks" ("priority");
 890  CREATE INDEX "#__scheduler_tasks_idx_cli_exclusive" ON "#__scheduler_tasks" ("cli_exclusive");
 891  CREATE INDEX "#__scheduler_tasks_idx_checked_out" ON "#__scheduler_tasks" ("checked_out");
 892  
 893  -- --------------------------------------------------------
 894  
 895  --
 896  -- Here is SOUNDEX replacement for those who can't enable fuzzystrmatch module
 897  --   from contrib folder.
 898  -- This function comes from https://wiki.postgresql.org/wiki/Soundex
 899  --   and is distributed with GPL license.
 900  -- Thanks to its author, Marti Raudsepp, that published this piece of code.
 901  --
 902  
 903  CREATE OR REPLACE FUNCTION soundex(input text) RETURNS text
 904  IMMUTABLE STRICT COST 500 LANGUAGE plpgsql
 905  AS $$
 906  DECLARE
 907    soundex text = '';
 908    char text;
 909    symbol text;
 910    last_symbol text = '';
 911    pos int = 1;
 912  BEGIN
 913    WHILE length(soundex) < 4 LOOP
 914      char = upper(substr(input, pos, 1));
 915      pos = pos + 1;
 916      CASE char
 917      WHEN '' THEN
 918        -- End of input string
 919        IF soundex = '' THEN
 920          RETURN '';
 921        ELSE
 922          RETURN rpad(soundex, 4, '0');
 923        END IF;
 924      WHEN 'B', 'F', 'P', 'V' THEN
 925        symbol = '1';
 926      WHEN 'C', 'G', 'J', 'K', 'Q', 'S', 'X', 'Z' THEN
 927        symbol = '2';
 928      WHEN 'D', 'T' THEN
 929        symbol = '3';
 930      WHEN 'L' THEN
 931        symbol = '4';
 932      WHEN 'M', 'N' THEN
 933        symbol = '5';
 934      WHEN 'R' THEN
 935        symbol = '6';
 936      ELSE
 937        -- Not a consonant; no output, but next similar consonant will be re-recorded
 938        symbol = '';
 939      END CASE;
 940  
 941      IF soundex = '' THEN
 942        -- First character; only accept strictly English ASCII characters
 943        IF char ~>=~ 'A' AND char ~<=~ 'Z' THEN
 944          soundex = char;
 945          last_symbol = symbol;
 946        END IF;
 947      ELSIF last_symbol != symbol THEN
 948        soundex = soundex || symbol;
 949        last_symbol = symbol;
 950      END IF;
 951    END LOOP;
 952  
 953    RETURN soundex;
 954  END;
 955  $$;


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer