Tweet
Osm Admin:

đź‘ŤAdding an explicit property to an existing table, then making it non-nullable.
đź‘ŤAdding data conversions to table migrations.

#buildinpublic

osm.software/blog/22/04/dat…
You are here to finish things:

1. Define a small step forwards.
2. Make it fail.
* For an internal feature, write a test.
* For a visual feature, sketch a page or an action.
* For a CLI feature, create a command.
3. Make it work.
4. Repeat.

#buildinpublic
Osm Admin:

đź‘ŤIn 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.

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

đź‘ŤYesterday, I moved the table creation code into new schema diff migration engine.
đź‘ŤNow, working on notification table migrations.

#buildinpublic

osm.software/blog/22/04/dat…
I document all the technical debt in "Later" sections of my blog.

And it's not really "debt". When the "later" comes, it may not be relevant anymore, or there may be more important things to do.

I wonder what's a better term?

#buildinpublic
Osm Admin:

đź‘ŤI found out that the whole search index creation should be done during indexing, not migrations.
đź‘ŤI refactored diff algorithm and made it much easier to read.

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

Before digging into property diff algorithm, let's dig into how exactly it's used, and what other property-related logic is there.

#buildinpublic

osm.software/blog/22/04/dat…
@MeetKevon preaches that Twitter is for building relationships first, and everything else follows.

I can't agree more!

So, all, let's talk. What are you up to? And how can I help you with that?

Answer 👇, or DM me.

#buildinpublic
Yesterday, I continued working on schema migrations:

đź‘Ťimplemented table diff algorithm
đź‘Ťtook into consideration table renames

#buildinpublic

osm.software/blog/22/04/dat…
Your logs are as useful as they are able to answer questions about your application:

🔹Why Doesn't It Work?
🔹Why Is It Slow?
🔹Why Is Data Incorrect?
🔹Why Is It Resource-Hungry?

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

đź‘Ť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.

#buildinpublic

osm.software/blog/22/04/dat…
Get your hands dirty.

That's what I'm doing right now.

#buildinpublic
Osm Admin, #buildinpublic

More dots got connected in the schema migration design, see this post for details.

osm.software/blog/22/04/dat…

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.
Osm Admin:

Schema migrations in development and in production are different things. Here is how:

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

In spirit of TDD, I started with a meaningful, but failing test that is reasonably fast. Then, I worked to make it green:

* implemented the loading of schema fixtures from the codebase;
* worked on generating migration files.

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

đź‘ŤSchema migrations using TDD and schema fixtures

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

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.

Here are some thoughts.

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

đź‘ŤI finished the proof-of-concept minimum UI. Yay!
đź‘ŤNow I'm focusing on consistent and reliable altering of the existing database schema.

#buildinpublic

osm.software/blog/22/04/dat…
Osm Admin:

đź‘ŤI implemented the last user action that is typical to a CRUD application - object deletion.

#buildinpublic

osm.software/blog/22/04/dat…
Done:

đź‘ŤRoutes responsible for creating new products, and modifying existing products
đź‘ŤIncremental indexing
đź‘ŤCloning query objects
đź‘Ť`INSERT INTO ... SELECT ...` statements

#buildinpublic

osm.software/blog/22/04/dat…