Giter Club home page Giter Club logo

Comments (2)

adrenth avatar adrenth commented on June 16, 2024

Hi @chocolata,

Would you like to post the current SQL structure of the vdlp_redirect_redirects table of your project? I'm curious what type the primary key is of this table.

The create table SQL should be similar like this:

CREATE TABLE `vdlp_redirect_redirects` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(10) unsigned DEFAULT NULL,
  `match_type` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `target_type` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'path_or_url',
  `from_scheme` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'auto',
  `from_url` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to_scheme` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'auto',
  `to_url` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `test_url` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cms_page` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `static_page` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `requirements` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status_code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `hits` int(10) unsigned NOT NULL DEFAULT 0,
  `from_date` date DEFAULT NULL,
  `to_date` date DEFAULT NULL,
  `sort_order` int(10) unsigned NOT NULL DEFAULT 0,
  `ignore_query_parameters` tinyint(1) NOT NULL DEFAULT 0,
  `ignore_case` tinyint(1) NOT NULL DEFAULT 0,
  `ignore_trailing_slash` tinyint(1) NOT NULL DEFAULT 0,
  `is_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `test_lab` tinyint(1) NOT NULL DEFAULT 0,
  `test_lab_path` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `system` tinyint(1) NOT NULL DEFAULT 0,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vdlp_redirect_redirects_sort_order_index` (`sort_order`),
  KEY `vdlp_redirect_redirects_is_enabled_index` (`is_enabled`),
  KEY `vdlp_redirect_redirects_category_id_foreign` (`category_id`),
  CONSTRAINT `vdlp_redirect_redirects_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `vdlp_redirect_categories` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

from oc-redirect-plugin.

chocolata avatar chocolata commented on June 16, 2024

Hi @adrenth

Thanks for your swift reply. Below is the DDL:

create table vdlp_redirect_redirects
(
    id                      int unsigned auto_increment
        primary key,
    category_id             int unsigned                       null,
    match_type              varchar(12)                        null,
    target_type             varchar(12)  default 'path_or_url' not null,
    from_scheme             varchar(5)   default 'auto'        not null,
    from_url                mediumtext                         null,
    to_scheme               varchar(5)   default 'auto'        not null,
    to_url                  mediumtext                         null,
    test_url                mediumtext                         null,
    cms_page                varchar(255)                       null,
    static_page             varchar(255)                       null,
    requirements            text                               null,
    status_code             varchar(3)   default ''            not null,
    hits                    int unsigned default 0             not null,
    from_date               date                               null,
    to_date                 date                               null,
    sort_order              int unsigned default 0             not null,
    ignore_query_parameters tinyint(1)   default 0             not null,
    ignore_case             tinyint(1)   default 0             not null,
    ignore_trailing_slash   tinyint(1)   default 0             not null,
    is_enabled              tinyint(1)   default 0             not null,
    test_lab                tinyint(1)   default 0             not null,
    test_lab_path           mediumtext                         null,
    `system`                tinyint(1)   default 0             not null,
    description             varchar(255)                       null,
    last_used_at            timestamp                          null,
    created_at              timestamp                          null,
    updated_at              timestamp                          null,
    constraint vdlp_redirect_redirects_category_id_foreign
        foreign key (category_id) references vdlp_redirect_categories (id)
            on delete set null
)
    collate = utf8mb4_unicode_ci;

create index vdlp_redirect_redirects_is_enabled_index
    on vdlp_redirect_redirects (is_enabled);

create index vdlp_redirect_redirects_sort_order_index
    on vdlp_redirect_redirects (sort_order);
create table vdlp_redirect_redirect_logs
(
    id          int unsigned auto_increment
        primary key,
    redirect_id int unsigned          not null,
    from_url    mediumtext            not null,
    to_url      mediumtext            not null,
    status_code varchar(3) default '' not null,
    day         tinyint unsigned      not null,
    month       tinyint unsigned      not null,
    year        smallint unsigned     not null,
    date_time   datetime              not null,
    constraint vdlp_redirect_log
        foreign key (redirect_id) references vdlp_redirect_redirects (id)
            on delete cascade
)
    collate = utf8mb4_unicode_ci;

create index redirect_log_dmy
    on vdlp_redirect_redirect_logs (redirect_id, day, month, year);

create index redirect_log_my
    on vdlp_redirect_redirect_logs (redirect_id, month, year);

Above snippet is generated by PHP Storm.

A little context: this issue appeared after a migration to October CMS v2. I installed the Redirect plugin over the existing installation, so it would register in the projects' composer file.

Uninstalling the plugin and reïnstalling seems to have fixed the issue.

from oc-redirect-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.