BEGIN TRANSACTION;
CREATE TABLE actor (
	actor_id INTEGER PRIMARY KEY AUTOINCREMENT,
	first_name TEXT NOT NULL,
	last_name TEXT NOT NULL,
	last_update NUMERIC NOT NULL
);
CREATE INDEX idx_actor_last_name ON actor(last_name);

CREATE TABLE `address` (
	`address_id` INTEGER PRIMARY KEY AUTOINCREMENT,
	`address` TEXT NOT NULL,
	`address2` TEXT NOT NULL,
	`district` TEXT NOT NULL,
	`city_id` TEXT NOT NULL,
	`postal_code` TEXT NOT NULL,
	`phone` TEXT NOT NULL,
	`last_update` TEXT NOT NULL default CURRENT_TIMESTAMP
);
CREATE INDEX idx_fk_city_id on address(city_id ASC);

CREATE TABLE film (
	film_id INTEGET NOT NULL PRIMARY KEY AUTOINCREMENT,
	actor_id INTEGER NOT NULL,
	name TEXT NOT NULL
);
	

COMMIT;
