Jump to content

Adding columns to existing tables for application


GriefCode

Recommended Posts

Hey,

i ran into a small issue.
I've added extensions for GroupForm & MemberForm to add new permission sets.

For that I need to extend the table of core_groups & core_members afaik.

How can I do that? The only solution I found was the installer query, or is that actually the solution?

Link to comment
Share on other sites

8 minutes ago, Michael Schneider said:

The only solution I found was the installer query, or is that actually the solution?

Exactly :)

And please don't forget to remove the custom columns via an uninstall extension (Please also take a look at https://invisionpower.com/forums/topic/423254-dev-hint-uninstall-extension-best-practice/ )

 

Link to comment
Share on other sites

1 hour ago, Adriano Faria said:

For apps, you should add your queries in Versions tab. Those columns will be dropped when you uninstall the app.

I got still an issue.

I have added the queries, build the application and deployed it, but for some reason the queries where not deployed.

Some minor code parts:

Screen Shot 2016-11-25 at 22.06.50.png

Screen Shot 2016-11-25 at 22.04.25.png

The repository is also up to date and here: https://github.com/gamershost/Forum-Report-Archive

Link to comment
Share on other sites

9 hours ago, Michael Schneider said:

No, sorry that image was really bad choosen.

Here is the whole file with core_members queries:

https://github.com/gamershost/Forum-Report-Archive/blob/master/setup/upg_10000/queries.json#L281-L392

These queries (for core_members, core_groups) should be in setup/install/queries.json not upgrade

ACP - System - Applications - your app - Developer center - Versions - Installation Routine - Add SQL Query

Link to comment
Share on other sites

You indicated you built the application and deployed it, which leaves some gray area here. Are you testing against a test install, but pushing your code to a production installation once you are happy with it? Does it share the same database? If not, you will need to run the upgrader (siteUrl/admin/upgrade/ by default) and upgrade your application on your production installation to run the database changes.

Link to comment
Share on other sites

3 hours ago, bfarber said:

You indicated you built the application and deployed it, which leaves some gray area here. Are you testing against a test install, but pushing your code to a production installation once you are happy with it? Does it share the same database? If not, you will need to run the upgrader (siteUrl/admin/upgrade/ by default) and upgrade your application on your production installation to run the database changes.

Hey,

thanks for following up, yes i develop on a local test install and once im happy i install it on my production server.
Of course the databases are fully split up. Who develops on a production database? :unsure:
So far the solution @newbie LAC noted is working for me as expected.

Or is there anything wrong with what i am doing at the moment?

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...