Conversation
|
as no one cares let's close it |
|
let's hope in another chance |
|
I think travis is failing because it needs a migrations sql file too? |
|
where ? and why? |
|
Migrations are used for changing the schema. New tables are changes to the
schema.
(Plus the migration command runs automatically on a deployment so no human
has to manually alter the database)
On Thu, Mar 12, 2020 at 7:14 AM Nicola Galgano ***@***.***> wrote:
where ? and why?
cause no migration needed there 2 new tables
so my question is migrate what ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACZ7IKVJGXPQT6XYJB5CF3RHDG2TANCNFSM4HELEYQA>
.
--
- Michael Please pardon any errors, this message was sent from my iPhone.
|
|
so what i should do... please help me |
|
@mbabker where does travis actually populate the db? Currently missing the place where schema is populated @alikon migrations folder located https://github.com/joomla/statistics-server/tree/master/etc/migrations create a new file similar to others already there |
|
This line inside the tests. Database is seeded as needed. |
|
(Also, don’t put anything with triggers that use different delimiters inside the migrations, those don’t get parsed out right by PDO so those bits I do have to manually run on the database when ready) |
|
cool. you ok to create the migrations file in that case @alikon ? |
|
Also, just looking at the screenshots, would it not be better to use nested objects instead of complex strings for these groupings? Instead of: {
"data": {
"cms_php_version": {
"3.9.16 - 7.4.3": 123,
"3.9.16 - 7.4.2": 123,
"3.9.16 - 7.4.1": 123,
"3.9.16 - 7.4.0": 123
}
},
"total": 492
}Do this? {
"data": {
"cms_php_version": {
"3.9.16": {
"7.4.3": 123,
"7.4.2": 123,
"7.4.1": 123,
"7.4.0": 123
}
}
},
"total": 492
} |
|
migration file created but travis still complain |
|
If you can run the tests local (which you should be able to, it's basically copy As for the failures: 1) Joomla\StatsServer\Tests\Database\MigrationsTest::testTheMigrationStatusIsCheckedAfterExecutingTheFirstMigration
Failed asserting that 2 is identical to 1.
/home/travis/build/joomla/statistics-server/tests/Database/MigrationsTest.php:65For this one, the test needs to be updated. I think instead of For the view failures, I have no idea how you've changed the builder but it's implying that the JSON is no longer being built correctly (because realistically since the model data is being mocked those shouldn't be failing if you're adding new keys). |
|
|
i've modified the |
|
@alikon can you merge in master here |
|
i'm not allowed to do this from the github UI |
|
It would be better. I think I'm just going to fix forwards here if things break. travis seems to suggest things are ok. so fingers crossed |

rework of #40, #41
Summary of Changes
added 2 new end-point
added 2 new tables
updated triggers
Testing Instructions
api endpoint
?source=cms_php_versionapi endpoint
?source=db_type_versionwhen authorized you should expect something like :