Package org.cyclos.db
Class GenerateDbSchema
- java.lang.Object
-
- org.cyclos.db.GenerateDbSchema
-
public class GenerateDbSchema extends Object
Generates the db-schema.json file for the vanilla Cyclos schema. This class uses a docker container to start a PostgreSQL server, starts a Cyclos context and then stops the container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGenerateDbSchema.GenerateDbSchemaConfiguration
-
Constructor Summary
Constructors Constructor Description GenerateDbSchema()GenerateDbSchema(File outFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)voidprocess(Integer portParam)
-
-
-
Field Detail
-
DB
public static final String DB
- See Also:
- Constant Field Values
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
CYCLOS_DB_OPTIONS
public static org.stro.dbdiff.LoadFromDatabaseOptions CYCLOS_DB_OPTIONS
-
-
Constructor Detail
-
GenerateDbSchema
public GenerateDbSchema()
-
GenerateDbSchema
public GenerateDbSchema(File outFile)
-
-
Method Detail
-
main
public static void main(String[] args) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
process
public void process(Integer portParam) throws SQLException, IOException
- Parameters:
portParam- if null it starts a new docker container, otherwise it connects to a running PostgreSQL using the given port- Throws:
SQLExceptionIOException
-
-