Problem/Motivation

I've added 4 collections at this point. And each of those results in a new code pools table in the DB. I don't think we want that. This will result in thousands of tables.

Proposed resolution

Only use a single table per plugin type?

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
Screenshot from 2020-04-02 15-51-12.png17.53 KBheddn

Issue fork codes_pool-3124589

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 8.x-2.x Comparechanges, plain diff MR !1
  • 3124589 Comparecompare

Comments

heddn created an issue. See original summary.

sbergmann’s picture

@heddn I believe we don't want one great table, here are some of my thoughts as to why we want the codes pools as seperate tables.

  • A code pool might contain a list of prospect emails, another pool might have 11 alphanumeric characters, and so on with custom validation or data. So keeping these in different tables should help keep the pools clean with valid data.
  • Table locking would be less prone in separate tables, as well as indexing smaller vs very large table
sbergmann’s picture

@heddn @vijaycs85
After reviewing this some more we have decided that we will want to make bundles of codes pools. Each Bundle would be stored as a single large table and be able to reference it's own sources. The sources could have specific constraints which will allow for handling unique codes uploaded on a per bundle level table, as well as constraints on the source of the pool data. This way we'll be able to have a more reusable codes pool module.

ie. A Codes pool could be used to dispense codes, or simple to store codes, prospect emails, phone numbers, etc for use in granting access or verification method for a tool.

In having a large table per bundle we will solve the issue of creating a new table for each code collection, as we will only create a new table on the bundle level.

heddn’s picture

That seems really reasonable. Thanks for pondering this.

vijaycs85 made their first commit to this issue’s fork.

vijaycs85’s picture

Status: Active » Needs review

  • vijaycs85 committed 6bab6be on 8.x-2.x
    Issue #3124589 by vijaycs85, heddn: Reduce number of tables
    
vijaycs85’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.