Skip to content

Commit 8013166

Browse files
committed
feat(data): create initial DatabaseSeedingService class
Adds the foundational `DatabaseSeedingService` class. This service will be responsible for all database schema creation and data seeding operations.
1 parent d20b3aa commit 8013166

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import 'package:logging/logging.dart';
2+
import 'package:postgres/postgres.dart';
3+
4+
/// {@template database_seeding_service}
5+
/// A service responsible for initializing the database schema and seeding it
6+
/// with initial data.
7+
///
8+
/// This service is intended to be run at application startup, particularly
9+
/// in development environments or during the first run of a production instance
10+
/// to set up the initial admin user and default configuration.
11+
/// {@endtemplate}
12+
class DatabaseSeedingService {
13+
/// {@macro database_seeding_service}
14+
const DatabaseSeedingService({
15+
required Connection connection,
16+
required Logger log,
17+
}) : _connection = connection,
18+
_log = log;
19+
20+
final Connection _connection;
21+
final Logger _log;
22+
23+
// Methods for table creation and data seeding will be added here.
24+
}

0 commit comments

Comments
 (0)