yiisoft / queue-db

Database adapter for queue.
https://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Process to run sql to create the queue table in the database #15

Open aphraoh opened 7 months ago

aphraoh commented 7 months ago

What steps will reproduce the problem?

There is currently no process to run the sql to create the queue table in the database

What is the expected result?

One of the following should available....

  1. Migration using Yii DB Migration
  2. Consule command using Yii Console Application
  3. Other suggestions welcome

Does anyone example of how this might have been done in other packages?

What do you get instead?

Nothing!

Additional info

Here is the sql that need to be run...

CREATE TABLE IF NOT EXISTS `queue` (
  `id` int NOT NULL AUTO_INCREMENT,
  `channel` varchar(255) NOT NULL,
  `job` blob NOT NULL,
  `pushed_at` int NOT NULL,
  `ttr` int NOT NULL,
  `delay` int NOT NULL DEFAULT '0',
  `priority` int UNSIGNED NOT NULL DEFAULT '1024',
  `reserved_at` int DEFAULT NULL,
  `attempt` int DEFAULT NULL,
  `done_at` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `channel` (`channel`),
  KEY `reserved_at` (`reserved_at`),
  KEY `priority` (`priority`)
)
Q A
Version 1.0.?
PHP version
Operating system
samdark commented 7 months ago

https://github.com/yiisoft/rbac-db?tab=readme-ov-file#configuring-migrations

aphraoh commented 7 months ago

https://github.com/yiisoft/rbac-db?tab=readme-ov-file#configuring-migrations

Thanx @samdark , this is now done, now going to try and create the tests using rbac-db as example.

Also can we please now get it added here: https://www.yiiframework.com/status/3.0

samdark commented 7 months ago

Also can we please now get it added here: https://www.yiiframework.com/status/3.0

Tagged package with "yii3".