It should work. Here is an example to create a schema S1 and create a table under the schema S1:
CREATE SCHEMA S1;
GO
CREATE TABLE S1.Test
(
Id int IDENTITY(1, 1) NOT NULL CONSTRAINT [PK_Database_Index] PRIMARY KEY CLUSTERED,
TestValue varchar(10) CONSTRAINT [DF_Test_TestValue] DEFAULT ('A')
);
GO
You can see the Primary Key and Default Constraint are related to S1:
ALTER TABLE [S1].[Test] ADD CONSTRAINT [PK_Database_Index] PRIMARY KEY CLUSTERED ([Id] ASC) ON [PRIMARY]
GO
ALTER TABLE [S1].[Test] ADD CONSTRAINT [DF_Test_TestValue] DEFAULT ('A') FOR [TestValue]
GO
Now create a new schema S2 and then transfer the table Test from the schema S1 to S2:
CREATE SCHEMA S2;
GO
ALTER SCHEMA S2 TRANSFER S1.Test;
GO
If you script the primary key and default constraint, they are related to the schema S2 now:
ALTER TABLE [S2].[Test] ADD CONSTRAINT [PK_Database_Index] PRIMARY KEY CLUSTERED ([Id] ASC) ON [PRIMARY]
GO
ALTER TABLE [S2].[Test] ADD CONSTRAINT [DF_Test_TestValue] DEFAULT ('A') FOR [TestValue]
GO