Skip to content

Where should database initialization code live? #19

Description

@ctSkennerton

Thank you for making ReStore, it is very simple to use!

I'm looking through the documentation and there is something that confuses me. The below code snippet is used to initialize the database and in my development image I ran that in the playground to get started. But when deploying the application I wouldn't want to do that manual step. How do you manage these connections properties in your projects? Is this something that you would put into a class message or is there another way?

ReStore
	connection: (SSWSQLite3Connection on: (Smalltalk imageDirectory / 'test.db') fullName);
	connect;
	addClasses: {Customer. Address. CustomerOrder. CustomerOrderItem. Product};
	synchronizeAllClasses.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions