Skip to content

Commit 2a43cee

Browse files
Fix DB Scheme Issue
1 parent 00affdc commit 2a43cee

File tree

3 files changed

+102
-95
lines changed

3 files changed

+102
-95
lines changed

.circleci/config.yml

Lines changed: 99 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,115 @@
11
version: 2
22

33
shared: &shared
4-
working_directory: ~/build_directory/algoliasearch-magento-2
5-
steps:
6-
- checkout
4+
working_directory: ~/build_directory/algoliasearch-magento-2
5+
steps:
6+
- checkout
77

8-
- run:
9-
name: Override the Algolia extension with the cloned one
10-
command: |
11-
cd ~/magento_directory/vendor/algolia
12-
rm -rf algoliasearch-magento-2
13-
cp -R ~/build_directory/algoliasearch-magento-2 ~/magento_directory/vendor/algolia
14-
cd ~/magento_directory
15-
composer dump-autoload
8+
- run:
9+
name: Override the Algolia extension with the cloned one
10+
command: |
11+
cd ~/magento_directory/vendor/algolia
12+
rm -rf algoliasearch-magento-2
13+
cp -R ~/build_directory/algoliasearch-magento-2 ~/magento_directory/vendor/algolia
14+
cd ~/magento_directory
15+
composer dump-autoload
1616
17-
- run:
18-
name: Start database server
19-
command: |
20-
sudo service mysql start
21-
sleep 2
22-
ps aux | grep mysql
17+
- run:
18+
name: Start database server
19+
command: |
20+
sudo service mysql start
21+
sleep 2
22+
ps aux | grep mysql
2323
24-
- run:
25-
name: Install the extension
26-
command: |
27-
cd ~/magento_directory
28-
sudo service elasticsearch start # for some reasons has to be launched with the step
29-
sleep 10
30-
php -dmemory_limit=-1 bin/magento module:disable Magento_WebapiAsync Magento_Amqp Magento_MysqlMq Magento_MessageQueue
31-
php -dmemory_limit=-1 bin/magento module:enable Algolia_AlgoliaSearch
32-
php -dmemory_limit=-1 bin/magento setup:upgrade
24+
- run:
25+
name: Install the extension
26+
command: |
27+
cd ~/magento_directory
28+
sudo service elasticsearch start # for some reasons has to be launched with the step
29+
sleep 10
30+
php -dmemory_limit=-1 bin/magento module:disable Magento_WebapiAsync Magento_Amqp Magento_MysqlMq Magento_MessageQueue
31+
php -dmemory_limit=-1 bin/magento module:enable Algolia_AlgoliaSearch
32+
php -dmemory_limit=-1 bin/magento setup:upgrade
3333
34-
- run:
35-
name: Get the right tests config for DB and administration
36-
command: |
37-
rm -rf ~/magento_directory/vendor/dotmailer/dotmailer-magento2-extension/Test ~/magento_directory/vendor/dotmailer/dotmailer-magento2-extension-chat/Test
38-
mv ~/build_directory/algoliasearch-magento-2/dev/tests/install-config-mysql.php ~/magento_directory/dev/tests/integration/etc/install-config-mysql.php
34+
- run:
35+
name: Get the right tests config for DB and administration
36+
command: |
37+
rm -rf ~/magento_directory/vendor/dotmailer/dotmailer-magento2-extension/Test ~/magento_directory/vendor/dotmailer/dotmailer-magento2-extension-chat/Test
38+
mv ~/build_directory/algoliasearch-magento-2/dev/tests/install-config-mysql.php ~/magento_directory/dev/tests/integration/etc/install-config-mysql.php
3939
40-
- run:
41-
name: Before setup
42-
command: |
43-
echo 'memory_limit = 256M' | sudo tee /usr/local/etc/php/php.ini
40+
- run:
41+
name: Before setup
42+
command: |
43+
echo 'memory_limit = 256M' | sudo tee /usr/local/etc/php/php.ini
4444
45-
- run:
46-
name: Get keys from dealer
47-
command: |
48-
if [ "$CIRCLE_PR_REPONAME" ]; then
49-
curl -s https://algoliasearch-client-keygen.herokuapp.com | sh >> $BASH_ENV
50-
fi
45+
- run:
46+
name: Get keys from dealer
47+
command: |
48+
if [ "$CIRCLE_PR_REPONAME" ]; then
49+
curl -s https://algoliasearch-client-keygen.herokuapp.com | sh >> $BASH_ENV
50+
fi
5151
52-
- run:
53-
name: Run tests
54-
command: |
55-
cd ~/magento_directory/dev/tests/integration
56-
sudo service elasticsearch start # for some reasons has to be launched with the step
57-
sleep 10
58-
php -dmemory_limit=-1 ../../../vendor/bin/phpunit --debug ../../../vendor/algolia/algoliasearch-magento-2/Test
52+
- run:
53+
name: Run tests
54+
command: |
55+
cd ~/magento_directory/dev/tests/integration
56+
sudo service elasticsearch start # for some reasons has to be launched with the step
57+
sleep 10
58+
php -dmemory_limit=-1 ../../../vendor/bin/phpunit --debug ../../../vendor/algolia/algoliasearch-magento-2/Test
5959
6060
jobs:
61-
"magento-2.4":
62-
<<: *shared
63-
docker:
64-
- image: algolia/magento2-circleci:8.1_2.4.4
61+
"magento-2.3":
62+
<<: *shared
63+
docker:
64+
- image: algolia/magento2-circleci:v3-2.3.5-p2
65+
66+
"magento-2.4":
67+
<<: *shared
68+
docker:
69+
- image: algolia/magento2-circleci:v3-2.4.0
70+
71+
"quality-tools":
72+
docker:
73+
- image: algolia/magento2-circleci:2.4.4-php7.4-v1
74+
working_directory: ~/build_directory/algoliasearch-magento-2
75+
steps:
76+
- checkout
77+
- run:
78+
name: Setting permissions
79+
command: |
80+
sudo chown circleci:circleci ~/.composer/
81+
- restore_cache:
82+
keys:
83+
- composer-v4-{{ checksum "composer.json" }}
84+
- composer-v4-
6585

66-
"quality-tools":
67-
docker:
68-
- image: algolia/magento2-circleci:8.1_2.4.4
69-
working_directory: ~/build_directory/algoliasearch-magento-2
70-
steps:
71-
- checkout
72-
- run:
73-
name: Setting permissions
74-
command: |
75-
sudo chown circleci:circleci ~/.composer/
76-
- restore_cache:
77-
keys:
78-
- composer-v4-{{ checksum "composer.json" }}
79-
- composer-v4-
80-
81-
- run:
82-
name: Prepare environment
83-
command: |
84-
sudo chown circleci:circleci ~/.composer/
85-
composer global config prefer-stable true
86-
composer global config minimum-stability dev
87-
composer global require algolia/magento2-tools
86+
- run:
87+
name: Prepare environment
88+
command: |
89+
sudo chown circleci:circleci ~/.composer/
90+
composer global config prefer-stable true
91+
composer global config minimum-stability dev
92+
composer global require algolia/magento2-tools
8893
89-
# We have to do this again because we restore the cache above, overwriting the vendor with the original.
90-
mkdir ~/magento_directory/vendor/algolia
91-
# rm -rf algoliasearch-magento-2
92-
cp -R ~/build_directory/algoliasearch-magento-2 ~/magento_directory/vendor/algolia
93-
cd ~/magento_directory
94-
composer dump-autoload
95-
- save_cache:
96-
key: composer-v4-{{ checksum "composer.json" }}
97-
paths:
98-
- vendor
99-
- run:
100-
name: Quality tools
101-
command: |
102-
sudo ~/.composer/vendor/bin/magento2-test ~/magento_directory/vendor/algolia/algoliasearch-magento-2 ~/.composer/vendor/bin/
94+
# We have to do this again because we restore the cache above, overwriting the vendor with the original.
95+
mkdir ~/magento_directory/vendor/algolia
96+
# rm -rf algoliasearch-magento-2
97+
cp -R ~/build_directory/algoliasearch-magento-2 ~/magento_directory/vendor/algolia
98+
cd ~/magento_directory
99+
composer dump-autoload
100+
- save_cache:
101+
key: composer-v4-{{ checksum "composer.json" }}
102+
paths:
103+
- vendor
104+
- run:
105+
name: Quality tools
106+
command: |
107+
sudo ~/.composer/vendor/bin/magento2-test ~/magento_directory/vendor/algolia/algoliasearch-magento-2 ~/.composer/vendor/bin/
103108
104109
workflows:
105-
version: 2
106-
build:
107-
jobs:
108-
- "magento-2.4"
109-
- "quality-tools"
110+
version: 2
111+
build:
112+
jobs:
113+
- "magento-2.3"
114+
- "magento-2.4"
115+
- "quality-tools"

etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<column xsi:type="text" name="data" nullable="false" comment="Data"/>
4141
<column xsi:type="text" name="error_log" nullable="false" comment="Error Log"/>
4242
<column xsi:type="int" name="data_size" unsigned="true" nullable="true" identity="false" comment="Data Size"/>
43-
<column xsi:type="datetime" name="created" on_update="true" nullable="true" comment="Date and time of job creation"/>
43+
<column xsi:type="datetime" name="created_at" on_update="true" nullable="true" comment="Date and time of job creation"/>
4444
</table>
4545
<table name="algoliasearch_landing_page" resource="default" engine="innodb" comment="Algoliasearch Landing Page Table">
4646
<column xsi:type="int" name="landing_page_id" unsigned="false" nullable="false" identity="true" comment="Landing Page Id"/>

etc/db_schema_whitelist.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"data": true,
3939
"error_log": true,
4040
"data_size": true,
41-
"created": true
41+
"created": true,
42+
"created_at": true
4243
}
4344
},
4445
"algoliasearch_landing_page": {

0 commit comments

Comments
 (0)