Questions tagged [install-script]

Denotes questions related to install scripts. Install scripts are scripts that are used for installation purposes. This installation may be of a software program or any other code routine.

Filter by
Sorted by
Tagged with
3
votes
0answers
68 views

How to reinstall module without any downtime or trigger InstallSchema.php on already installed module?

I am trying to reinstall a module on Magento ver. 2.2.8 to trigger the InstallSchema.php of a module without any downtime. My question: Is there a way of reinstalling the module or at least running ...
0
votes
3answers
36 views

Custom script leading to 404 in M2

I want to create a custom script for this I have created folder test on root and two files inside folder index.php , test.php My index.php Looks like require DIR . '../../app/bootstrap.php'; ...
1
vote
2answers
65 views

How to check if column exist before trying to add it to the table?

We are using the Extension FollowUp E-Mail from AheadWorks. The Extension has bugs in the sql install scripts... they are trying to add a column to a table but don't check if the column does already ...
1
vote
0answers
34 views

InstallScheme Script for dynamic rows Magento 2

I have created dynamic rows on product creation form. I have to save their value in custom table and retrieve as a dropdown on frontend product detail page w.r.t product ID. I am aware of the event ...
0
votes
0answers
36 views

magento 1.9 Custom install setup

I'm not able to create a custom table with my module, I followed many tutos but seems like my install is never called. My module work fine except for this part. I don't understand what's wrong... In ...
0
votes
1answer
72 views

How to add a new field to Custom Options

How can I extend the "Custom Options" in a configurable product? I need to add a new field named Identifier. Where can I find the necessary templates? I figured out that the template is in app\design\...
0
votes
0answers
18 views

Magento1 website Security patch installation by script then error show

Magento1 website Security patch installation by script and when run url in browser (like http://www.mywebsite.com/applypatch.php)then below error show: ERROR: "/app/etc/" must exist for proper ...
0
votes
1answer
27 views

Magento1 website Security patch installation by script

Magento1 my website i have installing following Security patch: Security patch 10975 Security patch 10415 Security patch 9767 Security patch 8788 Security patch 7405 but i want script in my root ...
1
vote
1answer
73 views

Magento 2 : Foreing key constraint issue

I'm trying to save records using the controller. I set foreign key in attribute_set_id and entity_type_id field in main table with eav_attribute_set and eav_entity_type respectivelly. But, when I ...
1
vote
1answer
170 views

Error Add Foreign Key Using Install Schema Magento 2

<?php namespace Magneto\BookFreeLayout\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\...
0
votes
1answer
68 views

adding custom attribute to category

I'm trying to add a new custom image attribute for category, following the guide here "https://webkul.com/blog/add-custom-image-attribute-category-magento-2/comment-page-1/#comment-16835" However, ...
0
votes
0answers
49 views

How to add a Megamenu programmatically in Magento 2?

I need to add Megamenu via an install/upgrade script. I've added my megamenu. I've figured out which tables get updated when I add Megamenu. The table which gets updated is mgs_megamenu ...
0
votes
1answer
22 views

Is there a way to perform a silent installation of Magento through a bash code?

Is there a way to perform a silent installation of Magento through a bash code? This is what I have in my bash: ... ... PRJ_MAGENTO_PUBK=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PRJ_MAGENTO_PRVK=...
0
votes
2answers
181 views

Question about UpgradeSchema and UpgradeData files

Sorry, I'm new in using Magento 2. In my UpgradeSchema.php I would like to add a column to my table and in my UpgradeData.php I would like to add new records to the table. In both the file i have ...
2
votes
1answer
205 views

how to add collation( utf8_general_ci) using install schema in magento2?

I want to create table using install schema in magento2 with column collation( utf8_general_ci) . how to do this?
0
votes
2answers
277 views

Magento 2 get database prefix on install data

How to get database table prefix on install data? It is showing "table or view not found". <?php namespace ...; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\...
1
vote
4answers
69 views

InstallSchema.php not working in magento2

I have been trying to create a table from InstallSchema.php, but some reason the table is getting created. I haved created a bare minimum module with the following files. 1. registration.php <...
0
votes
1answer
41 views

Magento 2 Custom module installation time create media directory

I want to create media directory with 777 recursive permission on custom module installation time, So I have created createDirectory function in InstallSchema. But currently directory is created with ...
2
votes
0answers
63 views

Insert data into core db table

I need to run this SQL query on Magento, but since I have a multi-tenant solution, it need to be done through Data/Install scripts as it will run every time a new client comes in. What should I use? ...
4
votes
1answer
37 views

Custom Page Form and db insertion magento 2

I have created a custom Form and try to store details in databse. but the product url field and image url is not saved in db. app/code/Dyode/Pricebeat/Controller/User/Post.php <?php namespace ...
0
votes
0answers
70 views

magento 2 how to install raw sql file or statements using setup scripts

Can any one suggest me how to use install scripts to execute raw sql statements or file.
0
votes
1answer
125 views

Wrong attribute set ID Mage_Eav_Model_Entity_Setup

I have been receiving this error. Error: mysql4-install-1.0.php" - Wrong attribute set ID";i:1;s:1016:"#0 /Applications/MAMP/htdocs/flicdes/app/code/core/Mage/Core/Model/Resource/Setup.php(644): ...
1
vote
1answer
139 views

Install script not running

I know there's a million of these questions with answers but I still can't solve this. It does create the line in the core_resource table, but my install script is supposed to die to show it's running,...
0
votes
1answer
117 views

Magento 1.9 add attribute to Credit memo item

I am trying to add a quantity to return to stock data to the credit memo item. I have made 2 install scripts. One adds a column to the database <?php $installer = $this; $installer->...
0
votes
2answers
109 views

How to create custom widget via Install?

I need to create widget category link via Upgrade. How to do this?
1
vote
0answers
53 views

Magento 2 : Call a function at the time of module installation

I want to call a function to send some store information through api call at the time of my custom module installation. Is there any event observer for this? How can we do it? Thanks. class ...
0
votes
1answer
261 views

Force-run module install script in Magento 2

I have added some install data to my module (EAV attributes), and it doesn't look like it's working. However, I don't seem to get any relevant errors in the logs, and am a bit lost on whether the ...
5
votes
2answers
1k views

How to fix this “Running schema recurring.Unique constraint violation found”

How to fix this error "Running schema recurring.Unique constraint violation found". This statement occurs when I used upgrade command of Magento 2 model upgradation.
2
votes
0answers
210 views

Magento 2: Filter by custom product/category attribute returns 0 results

I created a bool (int) attribute with a default value of 0 for both category & product entities. I reindexed, cleared cache, etc... Now, no matter what I do, I can't filter the collection using ...
1
vote
1answer
4k views

Magento 2 - Create product attribute programmatically

I have create product attribute of type select select with below configurations: $setup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'attribute_code', [ 'attribute_model' =>...
3
votes
2answers
709 views

Recurring Upgrade Scripts in Magento 2.0, 2.1, or 2.2?

According to this dev doc (emphasis mine) InstallData and InstallSchema scripts, which are executed on a clean (empty) database UpgradeData and UpgradeSchema incremental scripts, which ...
1
vote
1answer
916 views

Magento 2 : Creating widget using install script

I have a custom module for megamenu. I want to create some widgets predefined for the module when the customer installs this module. I have added the below script for creating the widget(widget type: ...
0
votes
2answers
2k views

Magento 2 - InstallData.php does not run again after first time

I have created my custom module to add more attributes for customers. The InstallData.php worked perfectly for the first time and added all the attributes I wanted. However, I need to add more ...
0
votes
2answers
712 views

How to manage InstallData.php File in magento 2

How can I manage my InstallData.php file when I want to create multiple attribute for customer and product? Here, in my InstallData file I have create an attribute for the product. namespace ...
3
votes
1answer
1k views

Magento 2 : Create product attribute with select box install script

I'm having issues while creating product attribute with Install Data.php with my custom module. Attribute is crated also with options what i have defined in source but i am facing weird check below ...
0
votes
1answer
128 views

How to do db table collate change using update script?

I am trying to make a collate change (DEFAULT CHARSET=utf8 COLLATE utf8_general_ci) to db but not sure how? (magento1.9) <?php $installer = $this; $installer->startSetup(); $installer->...
0
votes
1answer
317 views

Magento 2 Install schema

When I am adding column of TYPE_DECIMAL like this ->addColumn( 'credit', Table::TYPE_DECIMAL, null, ['nullable' => false, 'default' => '0.00', 'length' => '10,2'], '...
0
votes
1answer
108 views

Add new form code for customer_form_attribute in Magento 1.9

I added new customer fields (attributes) by installer in my Magento extension. I want group this fields and show in separate tabs on customer edit page. I can make it in installer with this code ...
3
votes
2answers
1k views

Magento 2: Run a uninstall script when module is uninstalled via command line?

I am creating a module and I am progressing it. I am new to Magento 2 so there are a lot of things that I am not yet familiar too. As a module creator, I am curious how to run an uninstall script when ...
1
vote
2answers
434 views

Magento 2.2.2 - InstallSchema.php - update multiple tables

While developing a new extension, I'm trying to update two tables at installation time by using Setup\InstallSchema.php. The tables are "admin_user" and "customer_entity", and I basically need the ...
2
votes
1answer
119 views

Install and data-install script with different versions?

I have a custom module with several install and upgrade scripts under the sql directory, that create and alter my sql table. When Magento runs the scripts it updates both version and data_version ...
1
vote
0answers
21 views

After Magento 1 security upgrade, the install scripts are not working

After a security version upgrade to version (1.14.3.6) Enterprise all my update scripts don't work. Whether it's inserting, updating... nothing in the install scripts executes. Anyone with a similar ...
0
votes
0answers
23 views

Magento2 model save() method connected to db table structure in the install schema

I have a basic model - MyModel. The install schema for the table that the model is working with is $setup ->getConnection() ->newTable('my_table') ->addColumn( 'id', Table::...
0
votes
1answer
116 views

Table create script not working Magento2

So I followed this tutorial on how to create a module with a table setup script: http://www.mage-world.com/blog/create-a-module-with-custom-database-table-in-magento-2.html I took out a few things ...
0
votes
1answer
21 views

How to unselect modules in CLI installation

When installing through the web UI wizard, you're given the option to not install certain modules (Customize your store -> Advanced Modules Configurations). Can the same be done with the CLI ...
5
votes
3answers
530 views

Magento2 What's the point of having both InstallSchema and UpgradeSchema

If UpgradeSchema/UpgradeData are executed when installing and upgrading a module what's the point of having InstallSchema/InstallData (besides just having a well-named file that is only executed once)....
0
votes
2answers
285 views

Magento Module Install Script not even running

I have an issue with my Magento setup - where no modules that I install, are actually installing the MySQL tables. This isn't just custom ones, these are MySQL tables that we've purchased, from ...
3
votes
1answer
654 views

Magento 2.1 How to Add a Second CMS Block in Category adminhtml

I am trying to add a second cms block in the category backend just below the default one. I copied and altered the category_form.xml and CategorySetup.php from core into a separate module. I think I ...
1
vote
2answers
67 views

I need to add to tables to database using InstallSchema.php How can i do that?

Below class is my InstallSchema.php <?php namespace Test2\Helloworld\Setup; use \Magento\Framework\Setup\InstallSchemaInterface; use \Magento\Framework\Setup\ModuleContextInterface; use \Magento\...
0
votes
2answers
145 views

How to convert php mysql install script so it can be used in phpMyAdmin

I'm having a little trouble getting Aoe Profiler to create the database tables. I sometimes convert to mysql install scripts so I use use them to create the tables through the SQL query in phpMyAdmin....