Osm Admin: ALTER TABLE. Non-NULL Data Conversion. Query Test Suite
2 years ago ∙ 5 minutes read
Implemented in Osm Admin:
- new ALTER TABLE algorithm
- NULL to non-NULL data conversion
- new query test suite
2 years ago ∙ 5 minutes read
Implemented in Osm Admin:
2 years ago ∙ 4 minutes read
This time, I tackled adding an explicit property to an existing table, and then making it non-nullable.
It raised the need for data conversions - additional handling of the existing data - or otherwise, the database engine fails, or the data becomes invalid.
And it made me split migrations in two parts - the one that runs before the data conversion, and the other one that runs afterwards.
2 years ago ∙ 3 minutes read
While working on diff algorithm I noticed a certain pattern that I use over an over again.
Using this pattern, I implemented notification table diff.
Finally, I rearranged diff/migration code for better code readability.
2 years ago ∙ 3 minutes read
Yesterday, I moved the table creation code into new schema diff migration engine.
Now, working on notification table migrations.
2 years ago ∙ 2 minutes read
This time:
2 years ago ∙ 1 minute read
Before digging into property diff algorithm, let's dig into how exactly it's used, and what other property-related logic is there.
2 years ago ∙ 2 minutes read
Yesterday, I continued working on schema migrations:
2 years ago ∙ 2 minutes read
After a system update, I've got some problem with my laptop, and one thing to check was system log files.
This got me thinking: what makes a good log for my own application? And I think that application logs are as useful as they are able to answer potential questions I may have when an application is in production.
Let's think what kind of questions I might have, and what information might be useful to answer them.
2 years ago ∙ 4 minutes read
Recently, I fixed numerous issues to make the first migration tests work.
Then, I started implementing the schema diff algorithm - the basis for schema migrations.
2 years ago ∙ 1 minute read
More dots got connected in the schema migration design, see this post for details.
Then, I tried to return to TDDing it, but strange errors met me there, so I left them to be resolved in the next piece.
2 years ago ∙ 2 minutes read
Schema migrations are going to be generated and executed automatically under gulp watch
. It will result in lots of tiny migrations: add a column, change its type, make it not nullable, and so on.
It's convenient during development, but it might be not optimal to reapply in production. Indeed, it's better to convert a large table to new structure all at once rather than running a conversion for each of the tiny migration.
This observation contradicts the previously stated migration workflow, so let's update it.
2 years ago ∙ 4 minutes read
In spirit of TDD, I started with a meaningful, but failing test that is reasonably fast. Then, I worked to make it green:
2 years ago ∙ 1 minute read
After drafting some ideas of how the schema migrations should actually work, let's start implementing it in TDD way.
2 years ago ∙ 3 minutes read
The goal of the current iteration is to adjust the database schema and preserve/convert existing data according to any changes in schema classes, grids, forms or indexers.
This post presents some thoughts how it might work with class definitions.
2 years ago ∙ 2 minutes read
After finishing the iteration "#17 Minimum UI", I revisited the goals and the scope of the minimum viable product, and picked the most pressing task for the next iteration - "#18 Database Schema Changes".
2 years ago ∙ 1 minute read
I implemented the last user action that is typical to a CRUD application - object deletion.
2 years ago ∙ 3 minutes read
Done:
INSERT INTO ... SELECT ...
statements2 years ago ∙ 2 minutes read
Today, I finished implementing an object creation form.
It works according to the specs on Interfaces and Forms. Currently, it only supports string and integer input fields; later, there will be a lot more.
Let's review how it works.
2 years ago ∙ 3 minutes read
In Osm Admin, a form is an integral part of the class user interface. It's a very specific kind of HTML form.
In this article, I'll review what's in a class form, and how it's reflected from the application code.
2 years ago ∙ 2 minutes read
Yesterday, I described a user interface pattern for managing data of a certain data class using a grid/form pair. Let's call this grid/form pair class interface in the admin
area.
In this article, I'll examine what moving parts are inside a class interface.
2 years ago ∙ 1 minute read
So far, I've been concerned about how application data is modeled, stored and handled internally.
Yet, the final objective a user interface for viewing and editing it visually.
Let's dream a bit about how it might look like.
2 years ago ∙ 5 minutes read
Yay, indexing works!
It's changed quite a bit, so let's review how it works from the very beginning.
2 years ago ∙ 1 minute read
I'm still working on indexing, and it seems to get one more refactoring. But more on that later.
Meanwhile, let's review Osm Admin modules, their responsibilities and dependencies.
3 years ago ∙ 2 minutes read
The project repository, osmphp/admin
, follows a typical Osm Framework-based project structure. However, this repository is going to be a reusable Composer package, and has important structural differences presented in this article.
3 years ago ∙ 2 minutes read
This article introduces the core project concepts: data object, data class, data query, and data schema.
3 years ago ∙ 1 minute read
I'm super-excited to announce that I'm starting a new project codenamed "The Big Red Button". It's about defining application data structures and logic in PHP code, pressing the big red button (hence the codename), and getting fully functioning Admin Panel and API.
2021 ∙ October ∙ Osm Framework
3 years ago ∙ 1 minute read
Throw the NotImplemented
exception in any code path that is not implemented yet, and configure the debugger to stop there whenever the code path is executed.
2021 ∙ August ∙ Osm Framework
3 years ago ∙ 1 minute read
Install and use osm
, osmc
, osmt
and osmh
command line aliases for faster command typing.
Note. This post is moved to Osm Framework documentation.
2021 ∙ August ∙ Osm Framework
3 years ago ∙ 1 minute read
Once PHP 8, Node and Gulp are installed, create new projects quickly using the command line.
Note. This post is moved to Osm Framework documentation.