I have two classes;
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table customer (
id integer auto_increment not null,
first_name varchar(255),
last_name varchar(255),
phone_number varchar(255),
email varchar(255),
address1 varchar(255),
address2 varchar(255),
suburb varchar(255),
city varchar(255),
postcode integer,
country varchar(255),
active integer,
constraint pk_customer primary key (id)
);
create table customer_login (
id integer auto_increment not null,
email varchar(255),
password varchar(255),
customer_number_reference integer,
constraint pk_customer_login primary key (id)
);
# --- !Downs
drop table if exists customer;
drop table if exists customer_login;
I would like to have the ID from customer showing as the cus number reference in customer_login
I would also like the email in the customer login table to be the same as that in customer.
What should my annotations look like to make this script generate these Fk's?
Cheers!