SchemaVersionManager class

Manages loading, saving, and accessing historical schema versions.

Constructors

SchemaVersionManager({required SupabaseGenConfig config, Logger? logger})
factory

Properties

config SupabaseGenConfig
final
currentSchemaVersion int
The highest schema version found or determined.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
previousSchemaStates Map<int, List<SupabaseTableInfo>>
Stores the loaded schema states, keyed by version number.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

detectSchemaChanges(List<SupabaseTableInfo> currentTables) bool
Compares the current table list against the last known version.
loadPreviousSchemas() Future<void>
Loads previous schema states from JSON files in the versions directory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveSchemaVersion(int version, List<SupabaseTableInfo> tables) Future<void>
Saves the current schema state to a versioned JSON file.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited