Proper way to store one plugin data value?

Hello,
my name is Alex from Mainz, new to this forum.
Since we need an “approval” function for mailings being approved by another admin before being sent out, I developed a plugin for this.
I need to store one single value (the ID of the approving admin) to each message in the database. My first idea was, to include an ALTER TABLE ADD statement for adding the column to the messages data table in the setup/init code of my plugin but I don’t know, if this way is encouraged my the main developers go phpList.
Can someone tell me if this is allowed or tolerated or must I create a new table just for storing this one value?

Besides, is anyone interested in my “Approval” plugin? If there’s some demand, I would consider offering it to the official plugin repository, if the result is of an acceptable quality :slight_smile:

@Alex If you are adding a tab to the Compose page then any input fields will automatically be added to the messagedata table when the message is saved.

You can use the messagedata table to store an arbitrary value associated with a message that may not be directly an input field. There is a phplist function to set a value in file admin/lib.php

function setMessageData($msgid, $name, $value)

then the value will be included in the message data that is returned by

function loadMessageData($msgid)

@duncanc Thanks very much, setMessageData() was the one I needed!