ckan icon indicating copy to clipboard operation
ckan copied to clipboard

Can't create a sysadmin because of permission_labels column and data column in activity table

Open Ombenitango opened this issue 1 year ago • 2 comments

CKAN VERSION IS 2.11.0a0

I managed to install ckan by follwing this steps Here

Everything is working fine until here ckan -c /etc/ckan/default/ckan.ini db init i also get this message Initialising DB: SUCCESS suggesting that everything is fine.

But now when i run ckan -c /etc/ckan/default/ckan.ini sysadmin add admin [email protected] name=admin

I got this [SQL: INSERT INTO activity (id, timestamp, user_id, object_id, revision_id, activity_type, data, permission_labels) VALUES (%(id)s, %(timestamp)s, %(user_id)s, %(object_id)s, %(revision_id)s, %(activity_type)s, %(data)s, %(permission_labels)s)] [parameters: {'id': '64314f70-053e-4eb6-b6bd-30ae71088a47', 'timestamp': datetime.datetime(2023, 12, 17, 7, 52, 19, 215902), 'user_id': 'd84ec396-2be7-40fd-858a-6d215fb9133e', 'object_id': 'd84ec396-2be7-40fd-858a-6d215fb9133e', 'revision_id': None, 'activity_type': 'new user', 'data': None, 'permission_labels': None}] (Background on this error at: https://sqlalche.me/e/14/f405) Can anyone help me please?

I search everywhere online but i cann't find anyhelp

Ombenitango avatar Dec 17 '23 09:12 Ombenitango

Try running

ckan db upgrade -p activity
# or 
ckan db pending-migrations --apply

Recently, we added a DB migration to the activity plugin. It has to be applied separately if you are using activity plugin. We are going to apply such migrations automatically, whenever you run db init, but for now you may need to do it manually

smotornyuk avatar Jan 22 '24 17:01 smotornyuk

Thank you so much 🤝

On Mon, Jan 22, 2024, 20:44 Sergey @.***> wrote:

Try running

ckan db upgrade -p activity# or ckan db pending-migrations --apply

Recently, we added a DB migration to the activity plugin. It has to be applied separately if you are using activity plugin. We are going to apply such migrations automatically, whenever you run db init, but for now you may need to do it manually

— Reply to this email directly, view it on GitHub https://github.com/ckan/ckan/issues/7987#issuecomment-1904501995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUQYLLYREQFWSDJG2UUFUWTYP2QRJAVCNFSM6AAAAABAYGW6B2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGUYDCOJZGU . You are receiving this because you authored the thread.Message ID: @.***>

Ombenitango avatar Jan 26 '24 13:01 Ombenitango