<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ceres/model/sql/migrate.sql, branch step-re-ordering</title>
<subtitle>Recipe server for your favorite dishes</subtitle>
<id>https://cgit.xengineering.eu/ceres/atom/model/sql/migrate.sql?h=step-re-ordering</id>
<link rel='self' href='https://cgit.xengineering.eu/ceres/atom/model/sql/migrate.sql?h=step-re-ordering'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/'/>
<updated>2024-10-13T16:54:18Z</updated>
<entry>
<title>Introduce xengineering.eu/ceres/model/migrations</title>
<updated>2024-10-13T16:54:18Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-10-13T12:08:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=ed19b82335345833c5b8f5446237d559a3657a35'/>
<id>urn:sha1:ed19b82335345833c5b8f5446237d559a3657a35</id>
<content type='text'>
This new package is only for database migrations. All data for Ceres
should be stored inside the SQLite3 database. Thus migrations can always
be executed with functions with the following signature.

    func(tx *sql.Tx) error

Those migration functions should be stored inside the new package.
Bigger SQL code can be stored in *.sql files for better syntax
highlighting. This code is embedded into the final Go executable by
using the embed package.
</content>
</entry>
<entry>
<title>model: Add per-step ingredients</title>
<updated>2024-05-12T18:52:25Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-04T12:54:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=87ae71413e47ef34da57bc1e0b8dddbf84b0c66a'/>
<id>urn:sha1:87ae71413e47ef34da57bc1e0b8dddbf84b0c66a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>model: CRUD methods only for targeted objects</title>
<updated>2024-04-06T18:22:04Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-04-06T16:45:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=4aee2c3b45caa890537a0fc0c850c4523a4eb56c'/>
<id>urn:sha1:4aee2c3b45caa890537a0fc0c850c4523a4eb56c</id>
<content type='text'>
A create, read, update or delete (CRUD) method should only care about
the object which provides the receiver and the relations to its child
objects.

For example the method

	func (r *Recipe) Create(tx *sql.Tx) error {}

should only create the relational data inside the database for the
recipe, not for the steps nested into this Recipe struct. This should be
covered by the

	func (s *Step) Create(tx *sql.Tx) error {}

method which is then called by `func (r *Recipe) Create()`.

This has the advantage that every CRUD method has a constraint scope and
is more unified since the Step CRUD methods now have a Step struct as
receiver instead of a Recipe receiver.
</content>
</entry>
<entry>
<title>model: Add recipe steps</title>
<updated>2024-03-24T09:10:54Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-03-10T09:59:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=ddc6e8e1fb8a4b1dfe8421b12e40b15162ae75f1'/>
<id>urn:sha1:ddc6e8e1fb8a4b1dfe8421b12e40b15162ae75f1</id>
<content type='text'>
This provides the infrastructure to create views and HTTP handlers to
provide recipe steps.
</content>
</entry>
<entry>
<title>model: Switch to very basic database schema</title>
<updated>2024-02-11T19:03:15Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-02-06T18:58:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=30303b34012f22cbe898dcebfd460709b206181d'/>
<id>urn:sha1:30303b34012f22cbe898dcebfd460709b206181d</id>
<content type='text'>
This simple model is used to test if it is helpful to implement the four
CRUD methods create, read, update and delete all inside the model
package.

The model package should also provide the datastructures for these
operations (well suited for the required views) aswell as tests for
them.

With this approach it should be possible to easily implement the view
and controller package because most of the logic is already inside the
model package and is tested.
</content>
</entry>
<entry>
<title>model: Add initial SQL migration</title>
<updated>2023-12-27T11:42:25Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2023-12-27T11:39:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/ceres/commit/?id=e7bbadc8f469d5cbfbc012932c83d1d440b6e8a3'/>
<id>urn:sha1:e7bbadc8f469d5cbfbc012932c83d1d440b6e8a3</id>
<content type='text'>
This provides the basic table structure to the database.
</content>
</entry>
</feed>
