improve tests
This commit is contained in:
@@ -18,10 +18,20 @@ GO
|
||||
CREATE USER demo_user WITH PASSWORD = 'pas$w0rd';
|
||||
GO
|
||||
|
||||
CREATE TABLE Products (ID int, ProductName nvarchar(max));
|
||||
-- a single table is used for all events in the cqrs system
|
||||
CREATE TABLE events
|
||||
(
|
||||
aggregate_type VARCHAR(256) NOT NULL,
|
||||
aggregate_id VARCHAR(256) NOT NULL,
|
||||
sequence bigint CHECK (sequence >= 0) NOT NULL,
|
||||
payload TEXT NOT NULL,
|
||||
metadata TEXT NOT NULL,
|
||||
PRIMARY KEY (aggregate_type, aggregate_id, sequence)
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
GRANT SELECT ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT INSERT ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT UPDATE ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT DELETE ON OBJECT::dbo.Products TO demo_user;
|
||||
GRANT SELECT ON OBJECT::dbo.events TO demo_user;
|
||||
GRANT INSERT ON OBJECT::dbo.events TO demo_user;
|
||||
GRANT UPDATE ON OBJECT::dbo.events TO demo_user;
|
||||
GRANT DELETE ON OBJECT::dbo.events TO demo_user;
|
||||
|
||||
Reference in New Issue
Block a user